libmudflap reports invalid reads when the result of localeconv() is accessed:
lconv.c: ============================================================= #include <stdio.h> #include <locale.h> int main(void) { struct lconv *lc; lc = localeconv(); printf("%s\n", lc->grouping); return 0; } ============================================================= Compiled with: gcc-4.3 -Wall -W -O2 -fmudflap -o lconv lconv.c -lmudflap Output: ******* mudflap violation 1 (check/read): time=1266169553.865149 ptr=0x7fda790a80c0 size=24 pc=0x7fda790b63d1 location=`lconv.c:11:2 (main)' /usr/lib/libmudflap.so.0(__mf_check+0x41) [0x7fda790b63d1] ./lconv(main+0x8f) [0x400aaf] /lib/libc.so.6(__libc_start_main+0xe6) [0x7fda78d59466] Nearby object 1: checked region begins 1929B after and ends 1952B after mudflap object 0xc83770: name=`stderr' bounds=[0x7fda790a7860,0x7fda790a7937] size=216 area=static check=0r/0w liveness=0 alloc time=1266169553.865140 pc=0x7fda790b6d71 Nearby object 2: checked region begins 2153B after and ends 2176B after mudflap object 0xc836b0: name=`stdout' bounds=[0x7fda790a7780,0x7fda790a7857] size=216 area=static check=0r/0w liveness=0 alloc time=1266169553.865140 pc=0x7fda790b6d71 number of nearby objects: 2 -- Summary: libmudflap: errors when accessing struct lconv members Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libmudflap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: stefan-usenet at bytereef dot org GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43063