Bug 65392 - Bad mangled names in Debug Mode assertions
Summary: Bad mangled names in Debug Mode assertions
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: 6.0
Assignee: François Dumont
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2015-03-11 18:20 UTC by Jonathan Wakely
Modified: 2015-05-24 12:53 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2015-03-11 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Wakely 2015-03-11 18:20:18 UTC
#include <deque>

int main()
{
    std::deque<int> d;
    auto it = d.begin();
    it - 2;
}



/usr/include/c++/4.8.3/debug/safe_iterator.h:378:error: attempt to retreat 
    a past-the-end iterator 2 steps, which falls outside its valid range.

Objects involved in the operation:
iterator @ 0x0x7fff3e6b1930 {
type = N11__gnu_debug14_Safe_iteratorINSt9__cxx199815_Deque_iteratorIiRiPiEENSt7__debug5dequeIiSaIiEEEEE (mutable iterator);
  state = past-the-end;
  references sequence with type `NSt7__debug5dequeIiSaIiEEE' @ 0x0x7fff3e6b1930
}
Aborted (core dumped)

The types shown are not valid symbol names and cannot be demangled. They are missing the _Z prefix.

We should not bother printing out mangled names if users can't demangle them to get something meaningful. Ideally we should be demangling them automatically.
Comment 1 François Dumont 2015-05-24 12:53:49 UTC
Symbols are now automatically demangle, the issue doesn't appear anymore.