Red Hat Bugzilla – Bug 144782
non-integer bytes in gcc
Last modified: 2007-11-30 17:07:05 EST
The issue is in the way a character string is initialized from the first
bytes of memory on the stack. In the past, the first byte was
predictably a non-integer. With libstdc++-3.2.3-49 and
gcc-c++-3.2.3-49, the first byte is predictably "4". We found this
because we passed it directly to ATOI() which understands integers as
valid input and non-integers as junk.
In this case, the fault was on our end for disobeying the docs and
assuming that junk would be junk. However, the implications are
interesting if other, more high profile programs, make that same
assumption. Also, I didn't want to have called you with a "bug" without
giving you some kind of followup.
From the incomplete description this sounds like you are triggering undefined
behaviour, so anything can happen. That would mean NOTABUG resolution.
If you post a (selfcontained) testcase what exactly you're talking about,
I'll look at it, but without a testcase this will be NOTABUGed soon.
Assuming NOTABUG, if you have self-contained testcase, please reopen.