libc bug alert

David Mosberger-Tang (davidm@AZStarNet.com)
Fri, 27 Oct 1995 17:54:34 -0700


My latest libc distribution (libc-linux-0.35.4davidm) fails to work
correctly with weak aliases in the data area. For example, the
following program segfaults:

main()
{
extern char ** environ;
char ** cpp;

cpp = environ;
while (*cpp) {
printf("environ string at %p = %s\n", cpp, *cpp);
++cpp;
}
}

If "environ" is replaced by "__environ", everything works fine. I'm
not sure whether the bug is in the library or in the assembler/linker.
In any case, you may want to wait with using the new library until
this is resolved.

--david