marcel added a comment.
In https://reviews.llvm.org/D33393#761679, @erik.pilkington wrote:
> Do you agree that this is the right approach here?
Sure. As long as it fixes PR32890.
You could append my test case as a quick-check.
So, I'll go ahead and abandon this revision?
https://reviews.llvm
marcel updated this revision to Diff 99850.
marcel added a comment.
Fixing off-by-one. Passes `make check-cxxabi` for LLVM in trunk on my machine
(x86-64, Ubuntu 16.04).
https://reviews.llvm.org/D33393
Files:
CREDITS.TXT
src/cxa_demangle.cpp
test/test_demangle.pass.cpp
Index: test/test
marcel added inline comments.
Comment at: src/cxa_demangle.cpp:3078-3079
++t1;
-db.names.back().first.insert(db.names.back().first.begin()+7,
t0, t1);
+if (db.names.back().first.length() > 7)
+ db.names.back()
marcel created this revision.
Check whether the string (db.names.back().first) is longer than 7 characters
before inserting another string at index 8.
https://reviews.llvm.org/D33393
Files:
CREDITS.TXT
src/cxa_demangle.cpp
test/test_demangle.pass.cpp
Index: test/test_demangle.pass.cpp