Real pain with SegFoult



Hi guys,

Actualy I'm facing REALY big problem with program for my M.Sc.
For three days I'am looking for a bug, but I'm not able to find it. It
is realy disaster for me becouse it is one of them which appears only
sometime, on some machines and with some parameters making it IMPOSSIBLE
to debug. Not goint into details, let's me tell you that I'am making it
on my home machine (Gentoo, AMD64) and trying from time to time on
remote big gun - Solaris (2.9 sparc). As you can predict, it (almost)
always works fine at home but on Solaris it gives me Seqmentation Foults
and Bus Errors (I've never known that there is such a thing.. till now
:). I'm doing a lot of malloc/realloc/free stuff so I think there have
to be some memory leaks...

I've googled a lot and I've tried some stuff:

1. It seems, that some time ago (when gcc was 2.9.5) it was a
-fcheck-memory-usage parameter that adds instruction to compiled
programam witch checks for memory leaks, out-of-bound errors and so on...
I belive, it would help me very much, but I think it is disabled now.
Was that mechanism removed or name of paremter changed?

2. Realizing that '-fcheck-memory-usage' is not going to help me I
started to look for outside soft. First was ccalloc... but I found it
useless.
It not only doesn't compile on my Solaris but also make some problems on
my linux while linking my stuff causing such blame as:
b.c: In function 'mkstr':
b.c:5: warning: incompatible implicit declaration of built-in function
'strcpy'
b.c:5: warning: incompatible implicit declaration of built-in function
'strlen'
/usr/lib/ccmalloc-gcc.o:(.eh_frame+0x12): undefined reference to
`__gxx_personality_v0'
collect2: ld returned 1 exit status
... so I given up with ccalloc

3. Next was valgrind. It seems to work fine, but only on my home linux.
I can't be compiled on sparc machine.
Thanks to it, I've fixed some minor bugs, but my stuff still segFoults.
I can't do anything more with that tool.

So, at the moment, I've tried everything I can find on google but I
haven't solve my leaking problem.

Do you have any experience with it? Do you know any other stuff which
may help me?

thank for ANY help
ps

I've also heard someting about mpatrol, and maybe I'll try it later.
.



Relevant Pages

  • Re: UNIX chess interfaces
    ... If there is a bug it will be noticed much quicker on Linux. ... the developer rarely has access to a Solaris system - although now there is Solaris x86 and Solaris x64, both of which are free downloads, this might change a bit. ... I really wonder whether gcc 4.1.1 would compile eboard on linux either. ...
    (rec.games.chess.computer)
  • Bug with Oracle 10.2.0.2 for Solaris 64bit
    ... compile on a Solaris 64bit computers form HP. ... Seems there is a bug in Oracle (What??? ... If you try to compile DBD::Oracle you may see this error ...
    (perl.dbi.users)
  • Re: Finally wrote-up my "How to Design Parts" section...
    ... csh and ksh also do file name completion, ... machines are offering csh simply as a link to tcsh. ... On Solaris 10 on Sun Ultra-2 machines, ... which I *also* have to download and compile before I can ...
    (rec.crafts.metalworking)
  • RE: DBD::Oracle 1.19 tests core against Oracle 10.2.0.1 - Solaris build
    ... I was able to successfully compile and link ... Seems Solaris has been a problem for a while. ... Configuring DBD::Oracle for perl 5.008008 on solaris ... Failed 13/14 tests, 7.14% okay ...
    (perl.dbi.users)
  • Re: Pedants
    ... it was a genuine bug. ... no reason to assume that gcc-specific headers will compile with any ... If some gcc-specific header didn't compile with gcc, ... general container library for instance. ...
    (comp.lang.c)