On Jan 13, 2004, Tobias Kretz <kretz@xxxxxxxxxxxxxxxxxxxxx> wrote: > causes the program to be terminated by a segmentation fault. Unless you're allocating too much memory (which could cause such odd behavior with a broken kernel, but not in general) or running out of stack space (quite unlikely, unless you have very slow stack ulimits), the most likely reason you're running into this problem is that you're corrupting the heap internal data structures. It may have happened long before the point in which you call malloc. I strongly recommend using some memory checker. GNU libc supports MALLOC_CHECK_ (look for it in the libc manual), but it doesn't catch all kinds of errors. There are several alternatives. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Happy GNU Year! oliva@{lsd.ic.unicamp.br, gnu.org} Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org} Free Software Evangelist Professional serial bug killer