This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/9907] gdb 6.8.50.20090225-cvs segfault in g++ demangler


------- Additional Comments From francois dot rigault at amadeus dot com  2009-03-16 16:52 -------
The problem reoccured (I did a fresh check out a few hours ago ...)
Here's the problem I get - this time not with the code from my comment above, 
but from a cppunit test.

After some investigation, here's what is happening :
cp-name-parser.y:2016 
cp_demangled_name_to_comp("CppUnit::TestCaseMethodFunctor::operator()() const")

is called. 


it seems the problem is coming from here :
gdb/cp-name-parser.y:504
   make_operator ("()", 0);  // define the operator with argument 0
then
libiberty/cp-demangle.c:1439
   { "cl", NL ("()"),        2 },  // define the operator with argument 2

The matching between those 2 is done in libiberty/cp-demint.c:166
if (len == cplus_demangle_operators[i].len 
    && args == cplus_demangle_operators[i].args // oups - won't match
    && strcmp (opname, cplus_demangle_operators[i].name) == 0)

Not sure how it is related, but anyway it seems hard that those 2 could ever 
match. Putting both argument values to 0 or both to 2 fix the problem anyway.




-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=9907

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]