Bug 144782 - non-integer bytes in gcc
non-integer bytes in gcc
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc (Show other bugs)
3.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-11 10:13 EST by Matt Jamison
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-18 08:58:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matt Jamison 2005-01-11 10:13:18 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.
Comment 1 Jakub Jelinek 2005-01-11 19:12:23 EST
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.
Comment 2 Jakub Jelinek 2005-01-18 08:58:19 EST
Assuming NOTABUG, if you have self-contained testcase, please reopen.

Note You need to log in before you can comment on or make changes to this bug.