Version: gcc (GCC) 3.3 20030226 (prerelease) (SuSE Linux)
SuSE 8.2 Pro 2.4.20-4GB
Dell PowerEdge 600SC 512MB Single Intel P4 2.4GHz
malloc() is sporadically returning a valid (non-null) pointer, but
the size of the allocation is 0 bytes. I've tried to work around
this using calloc() to force an explicit initialization, and while it
happens less frequently now it still happens.
I've run all the code through valgrind 2.0.0, and have confirmed that
there are no memory leaks.
valgrind --trace-malloc=yes -v --leak-check=yes ./myprog
Valgrind does pick up the 0-sized allocation when it happens, though:
==10733== Address 0x412896AC is 0 bytes after ...