So it seems to be "distro" related....hmmm... Anyone from Red-Hat wanna' chime in on this one? On Sun, 2003-07-06 at 15:52, John wrote: > On 6 Jul 2003, Sean Bruno wrote: > > > I have been troubleshooting an issue with a multi-threaded application > > port from Solaris X86 to Linux. > > > > It was randomly dumping core on "main" or other random parts of code. > > > > After hacking on the issue for about a week, I decided to write a little > > hello world program and compile it with the same options as my > > application. Lo-and-behold it cored in the same manner, randomly and > > confusingly. > > > > I then began to pare off flags and includes and libraries until, as if > > by magic, it began to work! > > > > It turned out that there is an existing issue all the way back to RH 7.2 > > with the compile option "-fstack-check" Here is my sample prog: > > > > int main() > > { > > printf ("Hello World\n"); > > return(0); > > } > > > > > > compile with: gcc -fstack-check -o test > > > > Run the output program up to 10 times. It should core dump at least > > once...Is this a bug in the kernel, compiler or standard libs? > > I'm running Debian/Woody. > summer@xxxxxx:~/test$ gcc -fstack-check -o test fstack-check.c > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ ./test > Hello World > summer@xxxxxx:~/test$ gcc --version > 2.95.4 > summer@xxxxxx:~/test$ > THis is okay too: > summer@xxxxxx:~/test$ gcc-3.0 --version > 3.0.4 > summer@xxxxxx:~/test$ > My glibc: > summer@xxxxxx:~/test$ ldd --version > ldd (GNU libc) 2.2.5 > Copyright (C) 2002 Free Software Foundation, Inc. > > However, ... > [summer@xxxxxx test]$ gcc -fstack-check -o test fstack-check.c > [summer@xxxxxx test]$ ./test > Hello World > [summer@xxxxxx test]$ ./test > Hello World > [summer@xxxxxx test]$ ./test > Hello World > [summer@xxxxxx test]$ ./test > Hello World > [summer@xxxxxx test]$ ./test > Segmentation fault > [summer@xxxxxx test]$ ./test > Segmentation fault > [summer@xxxxxx test]$ ./test > Segmentation fault > [summer@xxxxxx test]$ ./test > Segmentation fault > [summer@xxxxxx test]$ ./test > Hello World > [summer@xxxxxx test]$ gcc --version > 2.96 > [summer@xxxxxx test]$ ldd --version > ldd (GNU libc) 2.2.5 > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is > NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. > Written by Roland McGrath and Ulrich Drepper. > [summer@xxxxxx test]$ > Magpie is running Clark Connect release 0.9.1 which is basically Red Hat > Linux release 7.3 (Valhalla) -- Sean Bruno Telecommunications Engineer Metro One Telecommunications Desk (503)524-1632 Cell (503)358-6832 _______________________________________________ Redhat-devel-list mailing list Redhat-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/redhat-devel-list