--- - branch: MAIN date: Fri Jan 16 21:12:11 UTC 2009 files: - new: '1.9' old: '1.8' path: src/lib/libc/locale/_wctrans.c pathrev: src/lib/libc/locale/_wctrans.c@1.9 type: modified - new: '1.5' old: '1.4' path: src/lib/libc/locale/_wctrans_local.h pathrev: src/lib/libc/locale/_wctrans_local.h@1.5 type: modified - new: '1.3' old: '1.2' path: src/lib/libc/locale/_wctype.c pathrev: src/lib/libc/locale/_wctype.c@1.3 type: modified - new: '1.3' old: '1.2' path: src/lib/libc/locale/iswctype_mb.c pathrev: src/lib/libc/locale/iswctype_mb.c@1.3 type: modified id: 20090116T211211Z.871617836f549531ed7845f56eec384640ef63db log: "PR/40411: Hisashi T Fujinaka: standalone-tcsh dumps core when tab completing\n\nThe new rune code abuses __UNCONST to lazily initialize _RuneLocale. If\nthat happens to be the _DefaultRuneLocale which is const, the program will\ncore-dump because it will attempt to write to read-only memory. Catch this\nand clone a copy of the locale and return it. The reason we don't see\neverything core-dumping is because our shared library code probably loads\nthe text segment COW so it works (Is there an mprotect missing somewhere?).\nBut on statically linked binaries this is not the case and we die.\n\nXXX[1]: Vet the code so that we are sure that there is no more of that\n happening trying to get rid of much of the __UNCONST'ing.\nXXX[2]: This needs to be fixed for 5.0 and all related fixes.\nXXX[3]: There is one place in the code where _DefaultRuneLocale is treated\n\tspecially, does the patch break things?\n" module: src subject: 'CVS commit: src/lib/libc/locale' unixtime: '1232140331' user: christos