Markus Kuhn wrote:

> Curiously, is_malloced is never initialized by libtermcao! (Bug? I don't
> remember whether the C standard requires static variables to be
> initialized to zero by the runtime environment. Bad style in any case!)

They require it.

A compiler that would not initialize to zero, would break a *lot* of code.
And not just because it's badly written, in C as you don't have constructors
like C++, the fact the value of a static variable is still zero is a very usual
way to know some initialization has not been done yet.

> Could it be that xterm-136+unicode-0.7 contains a memory access error
> that somehow affects is_malloced in libtermcap?
>
> Unfortunately, I cannot reproduce the error by linking against a version
> of libtermcap with debugging information enabled, so it is difficult for
> me to see where exactly this happens.

Oups. They are ways nowadays to tests many things, but this are the hardest
bugs to find.

An hardware break point on this would be the easiest way to find out.
Unfortunately they do not seem to be working on x86 platform, at least on my
version of gdb


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

Reply via email to