gcc cvs head on Linux 2.6.11 on P4. I am chasing a problem with mudflap. Running off uptodate cvs head. To this end I created a simple test program (attached) which does many memory malloc/free in a heavily multithreaded environment.
The sample program aborts regularly, while the problem I am after is different - I get register violations where another object claims to overlap the same new address. I am rather sure that this is not the case with my program. I suspect that the two problems may be related. I observed the failure for a long while now, but did not have the time to address it earlier. It works OK without MF. The failure has different errors logged each time before it aborts. Here is the output of one run: [EMAIL PROTECTED]:~/zz$ sh zz37.sh /data2/usr/local/gcc-4.0.0-20050303-103350/bin/../lib/gcc/i686-pc-linux-gnu/4.1.0/../../../libmudflapth.so: warning: the use of `pthread_attr_setstackaddr' is deprecated, use `pthread_attr_setstack' /data2/usr/local/gcc-4.0.0-20050303-103350/bin/../lib/gcc/i686-pc-linux-gnu/4.1.0/../../../libmudflapth.so: warning: the use of `pthread_attr_getstackaddr' is deprecated, use `pthread_attr_getstack' zz37.sh: line 144: 25027 Segmentation fault $prog 2>$prog.out [EMAIL PROTECTED]:~/zz$ cat zz37.out /home/eyal/zz/zz37.c(104) testing in main /home/eyal/zz/zz37.c(109) testing in thread /home/eyal/zz/zz37.c(79) created free(): invalid pointer 0x80fc390! free(): invalid pointer 0x80b2768! free(): invalid pointer 0x810f6a8! free(): invalid pointer 0x808ec70! free(): invalid pointer 0x808a350! free(): invalid pointer 0x8094430! free(): invalid pointer 0x810bc28! free(): invalid pointer 0x8110c98! free(): invalid pointer 0x808d410! And another run: /home/eyal/zz/zz37.c(104) testing in main /home/eyal/zz/zz37.c(109) testing in thread /home/eyal/zz/zz37.c(79) created mf: erroneous reentrancy detected in `__mf_register' -- Summary: mudflap abort Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libmudflap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: eyal at eyal dot emu dot id dot au CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: gcc version 4.1.0 20050302 (experimental) GCC host triplet: Linux 2.6.11 SMP i686 GNU/Linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20339