public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/16328] New: __cxa_demangle  problem with member pointers as template parameters
@ 2004-07-02 12:58 ml105rl at despammed dot com
  2004-07-02 17:38 ` [Bug libstdc++/16328] " ian at wasabisystems dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ml105rl at despammed dot com @ 2004-07-02 12:58 UTC (permalink / raw)
  To: gcc-bugs

This input for __cxa_demangle 
 _ZN3awn3msg9InMessage6GetTLVINS_4dscr6StructI1xNS3_6MemberIMS5_iXadsrS5_NS5_1iEENS6_IMS5_dXadsrS5_NS5_1dEENS6_IMS5_NS_9fs_vectorIcLj3EEEXadsrS5_NS5_3vi3EENS3_4LastEEEEEEEEES5_EEbRT0_jRKNS0_9TLVVectorE

produces the following output:

bool awn::msg::InMessage::GetTLV<awn::dscr::Struct<x, awn::dscr::Member<int
x::*, &(x::x::i), awn::dscr::Member<double x::*, &(x::x::d),
awn::dscr::Member<awn::fs_vector<char, 3> x::*, &(x::x::vi3), awn::dscr::Last> >
> >, x>(x&, unsigned, awn::msg::TLVVector const&)

Note the "&(x::x::" parts. 

__PRETTY_FUNCTION__ gets it right:

bool awn::msg::InMessage::GetTLV(T&, unsigned int, const awn::msg::TLVVector&)
[with ValueT = awn::dscr::Struct<x, awn::dscr::Member<int x::*, &x::i,
awn::dscr::Member<double x::*, &x::d, awn::dscr::Member<awn::fs_vector<char, 3>
x::*, &x::vi3, awn::dscr::Last> > > >, T = x]

-- 
           Summary: __cxa_demangle  problem with member pointers as template
                    parameters
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ml105rl at despammed dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16328


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/16328] __cxa_demangle  problem with member pointers as template parameters
  2004-07-02 12:58 [Bug libstdc++/16328] New: __cxa_demangle problem with member pointers as template parameters ml105rl at despammed dot com
@ 2004-07-02 17:38 ` ian at wasabisystems dot com
  2004-07-02 18:59 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ian at wasabisystems dot com @ 2004-07-02 17:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ian at wasabisystems dot com  2004-07-02 17:38 -------
The 3.4 demangler fails to demangle this name at all.  When I look closely at
the name, it does not appear to be correctly mangled.  I see strings like this:
"XadsrS5_NS5_1iEE".  In PRETTY_FUNCTION, this appears as &x::i.  But that should
properly be mangled as "XadsrS5_1iE".  I can understand why the 3.3 demangler
generates what it does.  I can understand why the 3.4 demangler fails to
demangle the name at all.

Can you provide the preprocessed source code which generates this mangled name?
 I would like to what mangling is used by the current compiler.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian at wasabisystems dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16328


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/16328] __cxa_demangle  problem with member pointers as template parameters
  2004-07-02 12:58 [Bug libstdc++/16328] New: __cxa_demangle problem with member pointers as template parameters ml105rl at despammed dot com
  2004-07-02 17:38 ` [Bug libstdc++/16328] " ian at wasabisystems dot com
@ 2004-07-02 18:59 ` pinskia at gcc dot gnu dot org
  2004-07-13  2:26 ` ian at wasabisystems dot com
  2004-07-13 17:00 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-02 18:59 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16328


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/16328] __cxa_demangle  problem with member pointers as template parameters
  2004-07-02 12:58 [Bug libstdc++/16328] New: __cxa_demangle problem with member pointers as template parameters ml105rl at despammed dot com
  2004-07-02 17:38 ` [Bug libstdc++/16328] " ian at wasabisystems dot com
  2004-07-02 18:59 ` pinskia at gcc dot gnu dot org
@ 2004-07-13  2:26 ` ian at wasabisystems dot com
  2004-07-13 17:00 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: ian at wasabisystems dot com @ 2004-07-13  2:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ian at wasabisystems dot com  2004-07-13 02:26 -------
I also see that GNU/Linux nm 2.14.90.0.6 20030820 crashes on this test case. 
However, the current version of the demangler works correctly.  The mangled name
which appears to cause the crash is

_ZZN1x6GetTLVIN3awn4dscr6StructIS_NS2_6MemberIMS_iXadL_ZNS_1iEEENS4_IMS_dXadL_ZNS_1dEEENS4_IMS_NS_1yEXadL_ZNS_2y1EEENS2_4LastEEEEEEEEES_EEbRT0_E19__PRETTY_FUNCTION__

and the current demangler demangles that as

bool x::GetTLV<awn::dscr::Struct<x, awn::dscr::Member<int x::*, &(x::i),
awn::dscr::Member<double x::*, &(x::d), awn::dscr::Member<x::y x::*, &(x::y1),
awn::dscr::Last> > > >, x>(x&)::__PRETTY_FUNCTION__

The demangler has been completely rewritten since 2.14.90, so that crash can be
presumed to be fixed.

With your test case, the mainline compiler does not produce the questionable
XadsrS5_NS5_1iEE string.  Instead, it uses the local name construct
XadL_ZNS_1iEEE.  That seems correct and reasonable.

I am closing this PR as fixed, because to me it seems that it has already been
fixed in the mainline versions.  Let me know if you disagree.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16328


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/16328] __cxa_demangle  problem with member pointers as template parameters
  2004-07-02 12:58 [Bug libstdc++/16328] New: __cxa_demangle problem with member pointers as template parameters ml105rl at despammed dot com
                   ` (2 preceding siblings ...)
  2004-07-13  2:26 ` ian at wasabisystems dot com
@ 2004-07-13 17:00 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-13 17:00 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16328


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-07-13 17:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-02 12:58 [Bug libstdc++/16328] New: __cxa_demangle problem with member pointers as template parameters ml105rl at despammed dot com
2004-07-02 17:38 ` [Bug libstdc++/16328] " ian at wasabisystems dot com
2004-07-02 18:59 ` pinskia at gcc dot gnu dot org
2004-07-13  2:26 ` ian at wasabisystems dot com
2004-07-13 17:00 ` pinskia at gcc dot gnu dot org

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).