[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-24 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. Done (see https://github.com/google/oss-fuzz/blob/master/projects/llvm_libcxxabi/project.yaml) Repository: rL LLVM https://reviews.llvm.org/D33368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-24 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. > Also, are you now maintaining this code? > I am trying to find someone who wants to be CC-ed to other demangler bugs > automatically reported by oss-fuzz. I don’t think I’ll accept the title of maintainer, (I only have one commit in this file!) but I have som

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-24 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. Also, are you now maintaining this code? I am trying to find someone who wants to be CC-ed to other demangler bugs automatically reported by oss-fuzz. Repository: rL LLVM https://reviews.llvm.org/D33368 ___ cfe-commits mail

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-24 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. I also encourage you to run the fuzzer on every change in this code. Repository: rL LLVM https://reviews.llvm.org/D33368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-24 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. r303806 removes the assertion (instead just returning first). I though this should never happen, I'm looking into this testcase to see if there is another bug here. Thanks, Erik Repository: rL LLVM https://reviews.llvm.org/D33368 _

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-24 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. oss-fuzz finds the assertion failure in this new code: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1834 Repository: rL LLVM https://reviews.llvm.org/D33368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303718: [demangler] Fix a crash in the demangler during parsing of a lamdba (authored by epilk). Changed prior to commit: https://reviews.llvm.org/D33368?vs=99930&id=100041#toc Repository: rL LLVM h

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: src/cxa_demangle.cpp:3036 break; -if (db.names.size() < 2) +assert(k0 <= k1 && "parse_type() mutated the name stack"); +if (k1 == k0) --

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: src/cxa_demangle.cpp:3036 break; -if (db.names.size() < 2) +assert(k0 <= k1 && "parse_type() mutated the name stack"); +if (k1 == k0) ---

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 99930. erik.pilkington added a comment. In this new patch: - Add the testcase from https://reviews.llvm.org/D33393 - Add an assert() that k0 <= k1 - Use std::for_each instead of the for loop Thanks for taking a look, Erik https://reviews.llvm.org/D

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-22 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: src/cxa_demangle.cpp:3036 break; -if (db.names.size() < 2) +if (k1 <= k0) return first; erik.pilkington wrote: > compnerd wrote:

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: src/cxa_demangle.cpp:3036 break; -if (db.names.size() < 2) +if (k1 <= k0) return first; compnerd wrote: > I'm not sure how

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: src/cxa_demangle.cpp:3042-3051 +for (size_t k = k0; k < k1; ++k) { +auto tmp = db.names[k].move_full(); +if (!tmp.empty()) +{ +

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-21 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added inline comments. This revision now requires changes to proceed. Comment at: src/cxa_demangle.cpp:3036 break; -if (db.names.size() < 2) +if (k1 <= k0)

[PATCH] D33368: [libcxxabi][demangler] Fix a crash in the demangler

2017-05-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. Herald added a reviewer: EricWF. This patch fixes a bug in the demangler where a pack expansion template parameter substitution with more than one element in a lambda's parameter list resulted in either a misdemangle or a crash. I'll commit this change to