Article View: gnu.g++.bug
Article #1264g++ 2.3.1 bug
From: matt
Date: Wed, 16 Dec 1992 01:37
Date: Wed, 16 Dec 1992 01:37
24 lines
1372 bytes
1372 bytes
On an SGI Indigo running IRIX 4.0.5F, compiling all languages.
The UNSET_RESERVED_WORD macro in cp-lex.c, at line 734 reads:
#define UNSET_RESERVED_WORD(STRING) \
do { is_reserved_word (STRING, sizeof (STRING) - 1)->name = ""; } while (0)
and is used at line 751-2 as follows:
UNSET_RESERVED_WORD ("except");
UNSET_RESERVED_WORD ("exception");
"except" and "exception" are not reserved words so
is_reserved_word() returns NULL which is then deferenced, so
cc1plus core dumps with a segmentation fault.
My fix was to add a check that is_reserved_word (STRING, ...)
returned a non-NULL value before setting name to "".
cheers ...
-------------------------------------------------------------------------------
Matt Atterbury [matt@kau1.kodak.com] Kodak Australia FiDO Team
"klaatu barada nikto" "life? don't talk to me about life!"
Technical Details
Message-ID:
<9212150337.AA10523@elvira.kau1.kodak.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!elvira.kau1.kodak.COM!mattShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!elvira.kau1.kodak.COM!matt From: matt@elvira.kau1.kodak.COM (matt@bacchus.esa.oz.au) Subject: g++ 2.3.1 bug Message-ID: <9212150337.AA10523@elvira.kau1.kodak.com> Sender: gnulists@ai.mit.edu Reply-To: matt@elvira.kau1.kodak.com Organization: GNUs Not Usenet Distribution: gnu Date: Wed, 16 Dec 1992 01:37:04 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 25