Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/lib/libc/locale
Module Name: src
Committed By: christos
Date: Fri Jan 16 21:12:11 UTC 2009
Modified Files:
src/lib/libc/locale: _wctrans.c _wctrans_local.h _wctype.c
iswctype_mb.c
Log Message:
PR/40411: Hisashi T Fujinaka: standalone-tcsh dumps core when tab completing
The new rune code abuses __UNCONST to lazily initialize _RuneLocale. If
that happens to be the _DefaultRuneLocale which is const, the program will
core-dump because it will attempt to write to read-only memory. Catch this
and clone a copy of the locale and return it. The reason we don't see
everything core-dumping is because our shared library code probably loads
the text segment COW so it works (Is there an mprotect missing somewhere?).
But on statically linked binaries this is not the case and we die.
XXX[1]: Vet the code so that we are sure that there is no more of that
happening trying to get rid of much of the __UNCONST'ing.
XXX[2]: This needs to be fixed for 5.0 and all related fixes.
XXX[3]: There is one place in the code where _DefaultRuneLocale is treated
specially, does the patch break things?
To generate a diff of this commit:
cvs rdiff -r1.8 -r1.9 src/lib/libc/locale/_wctrans.c
cvs rdiff -r1.4 -r1.5 src/lib/libc/locale/_wctrans_local.h
cvs rdiff -r1.2 -r1.3 src/lib/libc/locale/_wctype.c \
src/lib/libc/locale/iswctype_mb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index