public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ian at wasabisystems dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug other/16240] [3.4/3.5 Regression] Seg Fault in collect2 (caused by C++ demangling) Date: Mon, 28 Jun 2004 15:39:00 -0000 [thread overview] Message-ID: <20040628153731.23351.qmail@sourceware.org> (raw) In-Reply-To: <20040628024250.16240.mckelvey@maskull.com> ------- Additional Comments From ian at wasabisystems dot com 2004-06-28 15:37 ------- I fixed the bug in the demangler which was causing it to dump core. However, that reveals a bug in the mangled name which g++ is generating. Skipping the analysis of the whole name, here is the end: LZNS_16complement_namesEELZNS_14COMPLEMENTENUMEEEE 'L' means a template argument. 'Z' means a local name 'NS_16complement_namesE' is a nested name (PatternDriver::complement_names) 'E' starts the entity name of the local name At this point we expect to see the name of a variable within the PatternDriver::complement_names class. Instead, we see another template argument. That is wrong. The bug is in write_template_arg(), in the DECL_P case. It has been there for a long time. I suspect that the correct patch is: diff -p -u -r1.101 mangle.c --- mangle.c 1 Apr 2004 03:50:39 -0000 1.101 +++ mangle.c 28 Jun 2004 15:36:01 -0000 @@ -2208,6 +2208,7 @@ write_template_arg (tree node) if (code == CONST_DECL) G.need_abi_warning = 1; write_char ('L'); + write_char ('_'); write_char ('Z'); write_encoding (node); write_char ('E'); Unfortunately, that would be an ABI change. I don't see how to correctly demangle this symbol. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |ian at wasabisystems dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16240
next prev parent reply other threads:[~2004-06-28 15:37 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-06-28 2:46 [Bug c++/16240] New: Seg Fault in collect2 mckelvey at maskull dot com 2004-06-28 3:24 ` [Bug c++/16240] " mckelvey at maskull dot com 2004-06-28 5:17 ` [Bug driver/16240] " pinskia at gcc dot gnu dot org 2004-06-28 7:21 ` pinskia at gcc dot gnu dot org 2004-06-28 7:28 ` [Bug other/16240] [3.4/3.5 Regression] Seg Fault in collect2 (caused by C++ demangling) pinskia at gcc dot gnu dot org 2004-06-28 15:30 ` cvs-commit at gcc dot gnu dot org 2004-06-28 15:39 ` ian at wasabisystems dot com [this message] 2004-06-28 16:08 ` [Bug c++/16240] [3.4/3.5 Regression] g++ generates incorrect mangled name ian at wasabisystems dot com 2004-06-28 17:45 ` giovannibajo at libero dot it 2004-07-01 17:23 ` [Bug c++/16240] [3.4/3.5 ABI " bkoz at gcc dot gnu dot org 2004-07-02 23:56 ` cvs-commit at gcc dot gnu dot org 2004-07-02 23:58 ` mmitchel at gcc dot gnu dot org 2004-09-05 3:27 ` jbuck at gcc dot gnu dot org 2005-01-31 22:12 ` pinskia at gcc dot gnu dot org 2005-02-28 15:17 ` cvs-commit at gcc dot gnu dot org 2005-07-27 22:56 ` uttamp at us dot ibm dot com 2005-07-27 23:09 ` ian at airs dot com 2005-07-28 18:29 ` uttamp at us dot ibm dot com 2005-07-28 22:56 ` ian at airs dot com 2005-07-29 18:31 ` uttamp at us dot ibm dot com 2005-07-29 23:24 ` ian at airs dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040628153731.23351.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).