LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-28-2005, 01:19 PM   #1
easykillsoft
LQ Newbie
 
Registered: Jun 2005
Distribution: Open SuSE 10
Posts: 23

Rep: Reputation: 15
gcc bounds checking patch help needed


I have a program (which I didn't write) but to make a long story short, I'm trying to fix serious errors where pointers are going out of bounds and corrupting other data. Its written in C, and the gdb core dump is about worthless. Best information I get is when it does crash it glibc sends a corrupt pointer message to my screen. To help figure out where it is, since the program is pretty large, at least 100k lines of code, I created a boundschecking patched gcc on my linux box. I'm running SuSE 10. It compiles just fine, but once it starts linking I am spammed with "undefined reference to `__bounds_check_component_reference_obj'" and similar messages for several minutes, when its finally done processing all the object files it just errors out with an exit status of 1.

I'm using gcc version 4.0.2 and bounds checking patch version 4.0.2

If anyone out there can shed some light on what I need to do to get gcc to link properly it would be a huge help.

Thanks.
 
Old 12-28-2005, 03:09 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
This function is a part of the bound checking patch. Are you sure you applied it correctly? Do other programs compile and link?
 
Old 12-28-2005, 04:11 PM   #3
easykillsoft
LQ Newbie
 
Registered: Jun 2005
Distribution: Open SuSE 10
Posts: 23

Original Poster
Rep: Reputation: 15
Huh... I just assumed it wouldn't work with a different program...

Wrote a simple hello world program and it compiled and ran just fine... now I'm really stumped...
 
Old 12-29-2005, 04:01 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Try something with at least one malloc()
 
Old 12-30-2005, 08:39 AM   #5
easykillsoft
LQ Newbie
 
Registered: Jun 2005
Distribution: Open SuSE 10
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Mara
Try something with at least one malloc()
Heh... kk...

It works just fine with malloc, and calloc, but I discovered it only does it if I use the -c option to compile everything to objects then use the -o command to merge the objects, which is how the Makefile is set up. Guess I just need to get the makefile to do it all in one step... I'm not to sure about makefiles, since the one I'm using was made long before I started trying to fixing stuff... so I'll have to start reading up on them...

Last edited by easykillsoft; 12-30-2005 at 09:10 AM.
 
Old 12-30-2005, 08:39 AM   #6
easykillsoft
LQ Newbie
 
Registered: Jun 2005
Distribution: Open SuSE 10
Posts: 23

Original Poster
Rep: Reputation: 15
Oh and thanks for the help
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Quota kernel patch needed for 2.6.xx? vrillusions Slackware 1 04-05-2005 12:16 PM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 02:13 PM
checking version of gcc on RH9 oasisbhrnw99 Linux - Newbie 2 10-18-2004 10:16 PM
SuSE 9.1 Personal Problems checking whether the C compiler (gcc ) works... no angus orion Linux - Newbie 2 07-29-2004 07:14 PM
checking whether the C compiler (gcc ) works... no Transition Linux - Newbie 19 07-01-2004 03:04 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration