In 4.8.2, running RHEL 6, this causes a mudflap violation: $ cat bug.cpp #include <iostream> int main() { char ch; return std::cin.get(ch).good(); } $ g++ -fmudflap -lmudflap bug.cpp $ MUDFLAP_OPTIONS=-viol-abort ./a.out < /dev/null ******* mudflap violation 1 (check/read): time=1388867469.284750 ptr=0x7f02844c4dc0 size=8 pc=0x7f02844ea088 location=`bug.cpp:6:34 (main)' /usr/local/cs/gcc-4.8.2/lib64/libmudflap.so.0(__mf_check+0x18) [0x7f02844ea088] ./a.out(main+0x10f) [0x400e6f] /lib64/libc.so.6(__libc_start_main+0xfd) [0x3ff621ecdd] number of nearby objects: 0 Abort The violation is reported whether or not the input is empty, and whether get or getline is used.
I think this was a bug in mudflap which has now been removed.
This was a sign of incompleteness of libstdc++ support for libmudflap. Please try the address-sanitizer options for the currently maintained variant of this functionality.