summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/cxa_demangle.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix demangling crasher. The crasher involved nested <encoding> involving ↵Howard Hinnant2013-12-111-8/+245
| | | | | | parameter packs, which exposed a logic bug causing an empty vector<string> to be accessed with back(). In addition to fixing the bug, I've inserted numerous preemptive checks for similar bugs in the hopes that if another bug is uncovered, the bug results in an invalid mangled string instead of a demangler crash. Test suite updated with string that was causing the crash. llvm-svn: 197063
* Move local Db type out to namespace scope.Howard Hinnant2013-10-221-22/+23
| | | | llvm-svn: 193169
* I had a buffer mismanagement bug in the demangler.Howard Hinnant2013-07-261-1/+5
| | | | llvm-svn: 187255
* I'd no sooner made the last commit when Matthew Dempsky sent me another test ↵Howard Hinnant2013-06-231-48/+15
| | | | | | case that led me to yet another closely related test case that the current design could not handle. I've now changed the way forward references are handled completely. It wasn't that much code to change. The demangler, when confronted with a forward reference to a template parameter, now parses things twice. During the second parse, all forward references are remembered from the first parse. Test suite updated with new case. llvm-svn: 184672
* After a private conversation with Arthur O'Dwyer, and a good night's sleep, ↵Howard Hinnant2013-06-231-6/+37
| | | | | | I believe this fix is a better fix than what I committed in r184656 yesterday. I've basically moved the checking for '`' from the start of the demangling process to the end of it. In the process I discovered that one of the test cases no longer demangled to the expected string. After further investigation I believe this case to not be a valid mangled string, and so I moved the test case to the 'invalid cases'. The reason I believe it is invalid is that it should use T_ instead of T0_ to index the template parameter. llvm-svn: 184668
* Filter out '`' in mangled strings and reject them as invalid if found.Howard Hinnant2013-06-231-1/+1
| | | | llvm-svn: 184656
* I created a random mangled name generator and have thrown about 200 million ↵Howard Hinnant2013-06-211-4/+2
| | | | | | random strings at the demangler. I succeeded in crashing it twice more and those crashers have been fixed and the test suite updated with the crash cases. llvm-svn: 184562
* Another demangler crasher. Updated test suite to prevent regression.Howard Hinnant2013-06-201-57/+263
| | | | llvm-svn: 184477
* Protect against invalid mangled names. Add test suite for invalid mangled ↵Howard Hinnant2013-06-201-1/+1
| | | | | | names. llvm-svn: 184394
* Demangle objc mangling implemented in r184250Howard Hinnant2013-06-191-3/+32
| | | | llvm-svn: 184301
* Tweaks/cleanups provided by Matthew DempskyHoward Hinnant2013-06-171-12/+6
| | | | llvm-svn: 184118
* Demangler update: This now demangles many more (all?) C++11 symbols. ↵Howard Hinnant2013-06-171-9843/+3183
| | | | | | Demangler tests updated. llvm-svn: 184097
* Add capability to demangle invocation functions for ObjC blocks.Howard Hinnant2013-04-101-0/+81
| | | | llvm-svn: 179208
* Rename class __lambda_node to ___lambda_node to fix compile failure with gcc ↵Daniel Malea2012-12-051-3/+3
| | | | | | | | 4.6 and 4.7 - using "__lambda_node" causes internal compiler error in newer GCC versions llvm-svn: 169402
* __list::ends_with_template was giving the wrong answer for empty lists. And ↵Howard Hinnant2012-11-301-30/+51
| | | | | | __parse_unnamed_type_name wasn't properly handling the list of paramters and was not safe against incorrectly mangled lambdas (running past last). llvm-svn: 169022
* Rename class __lambda to __lambda_node to avoid clash with gcc. This fixes ↵Howard Hinnant2012-09-211-3/+3
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=13889 llvm-svn: 164405
* Specifically disallow primary-expressions of the form LT_... on the basis of ↵Howard Hinnant2012-09-131-0/+4
| | | | | | this decition: http://sourcerytools.com/pipermail/cxx-abi-dev/2011-August/002422.html . Failure to disallow this was causing infinite recursion in the demangler when these symbols show up due to mangling bugs. This patch causes the demangler to return an invalid mangled name result rather than crash in infinite recursion. llvm-svn: 163859
* Fixes apple: #12020687. This was a problem in the demangler with templateHoward Hinnant2012-08-031-2/+3
| | | | | | | | | substitution forward references. That is, sometimes a mangled name refers to a substitution that hasn't yet been defined. The demangler was derferencing a null pointer in this case because it wasn't properly guarded against a forward reference. Test case added to catch this problem. llvm-svn: 161267
* Erik Olofsson: This patch adds support for lambda demangling. I fixed this ↵Howard Hinnant2012-08-011-4/+133
| | | | | | | | because it crashed lldb when it tried to demangle the added test. Not sure how it should identify the lambda so that might need changing from the current 'lambdax':: Howard: Please patch CREDITS.TXT. llvm-svn: 161125
* Andrew Morrow: The variable 't1' on line 10188 of cxa_demangle.cpp is ↵Howard Hinnant2012-07-291-1/+1
| | | | | | | | uninitialized which generates -Wsometimes-uninitialized. Howard: The only thing this patch is missing is an update to CREDITS.TXT. llvm-svn: 160932
* Don't dereference root in __parse_ctor_dtor_name unless it is known to not ↵Howard Hinnant2012-06-151-1/+1
| | | | | | be null. llvm-svn: 158556
* Fix bug in cxa_demangle involving template substitution.Howard Hinnant2012-05-021-6/+9
| | | | llvm-svn: 155994
* Richard Smith: __int128 is a GNU keyword which clang 3.1 supports. This ↵Howard Hinnant2012-04-181-2/+2
| | | | | | usage of it as an identifier will need to be renamed. llvm-svn: 155044
* Enable / silence -Wunused-parameter.Howard Hinnant2012-03-091-5/+5
| | | | llvm-svn: 152415
* Enable/silence -Wsign-compare.Howard Hinnant2012-03-081-10/+10
| | | | llvm-svn: 152335
* Enable/silence -Wconversion.Howard Hinnant2012-03-081-3/+3
| | | | llvm-svn: 152328
* Enable/silence -Wsign-conversion.Howard Hinnant2012-03-081-229/+309
| | | | llvm-svn: 152323
* Work on restricting symbol visibility.Howard Hinnant2012-02-021-3/+3
| | | | llvm-svn: 149633
* Fixed several bugs, implemented support for vector types, and cleaned out ↵Howard Hinnant2011-12-151-4573/+214
| | | | | | dead code. llvm-svn: 146677
* Fix size calculation for pointer to member functionHoward Hinnant2011-12-131-1/+3
| | | | llvm-svn: 146463
* Added support for <special-name> ::= TC <first type> <number> _ <second ↵Howard Hinnant2011-12-091-1/+131
| | | | | | type> # construction vtable for second-in-first, and for <special-name> ::= GR <object name> # reference temporary for object llvm-svn: 146274
* Updated heuristic regulating small string bufferHoward Hinnant2011-12-011-1/+4
| | | | llvm-svn: 145543
* Add alignment requirement to char bufferHoward Hinnant2011-11-281-1/+1
| | | | llvm-svn: 145277
* demangler: Drop preceeding () from function types, but not from pointers and ↵Howard Hinnant2011-08-121-0/+102
| | | | | | references to function types llvm-svn: 137469
* Silence some -Wall warnings pointed out by Marshall ClowHoward Hinnant2011-08-081-52/+0
| | | | llvm-svn: 137047
* In cxa_demangle.cpp, rewrite __parse_unresolved_name to reflect updated ↵Howard Hinnant2011-06-221-38/+77
| | | | | | understanding and sync with updated clang mangling. Also fix think-o in __parse_encoding enabling the parsing of trailing .eh and .b. llvm-svn: 133632
* initial importHoward Hinnant2011-05-051-0/+14933
llvm-svn: 130921
OpenPOWER on IntegriCloud