After all these interesting excursions into the matters of initialisation
of static variables (for the gory details, see section 6.7.8 in
<http://www.cl.cam.ac.uk/~mgk25/volatile/ISO-C-FDIS.1999-04.txt>;
ISO C does indeed guarantee to set static variables to 0, 0.0, or NULL)
and the merits and dangers of tgetent(), back to the original subject:

I believe that somewhere between main() is started and tgetent() is
called, an xterm bug causes a static variable of libtermcap to be
overwritten. How do I find whether and where this happens, if it happens
only when I use the Red Hat precompiled shared-library version of
libtermcap without debugging info? In other words, I don't even have the
address of is_malloc to watch it. Can I watch the entire bss segment of
libtermcap.so easily with gdb for changes?

If this crash doesn't happen for you, it might just mean that by lucky
coincidence (=> slightly different memory layout), the memory leak
doesn't spill onto some of your data structure where it hurts
noticeably. After all, the absence of a crash doesn't demonstrate the
absence of a problem ...

Markus

-- 
Markus G. Kuhn, Computer Laboratory, University of Cambridge, UK
Email: mkuhn at acm.org,  WWW: <http://www.cl.cam.ac.uk/~mgk25/>

-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/

Reply via email to