Commit Graph

3 Commits

Author SHA1 Message Date
Alp Toker ae3a944a6e Fix missed exception spec checks and crashes
Delayed exception specification checking for defaulted members and virtual
destructors are both susceptible to mutation during iteration so we need to
swap and process the worklists.

This resolves both accepts-invalid and rejects-valid issues and moreover fixes
potential invalid memory access as the contents of the vectors change during
iteration and recursive template instantiation.

Checking can be further delayed where parent classes aren't yet fully defined.
This patch adds two assertions at end of TU to ensure no specs are left
unchecked as was happenning before the fix, plus a test case from Marshall Clow
for the defaulted member crash extracted from the libcxx headers.

Reviewed by Richard Smith.

llvm-svn: 192947
2013-10-18 05:54:19 +00:00
Alp Toker be2a55f5ac Revert "Fix missed exception spec checks and crashes"
The changes caused the sanitizer bot to hang:
  http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/2311

Needs investigation.

This reverts commit r192914.

llvm-svn: 192921
2013-10-17 21:00:19 +00:00
Alp Toker de0be6232b Fix missed exception spec checks and crashes
Delayed exception specification checking for defaulted members and virtual
destructors are both susceptible to mutation during iteration so we need to
process the worklists fully.

This resolves both accepts-invalid and rejects-valid issues and moreover fixes
potential invalid memory access as the contents of the vectors change during
iteration and recursive template instantiation.

This patch also adds two assertions at end of TU to ensure no specs are left
unchecked as was happenning before the fix, plus a test case from Marshall Clow
for the defaulted member crash extracted from the libcxx headers.

Reviewed by Richard Smith.

llvm-svn: 192914
2013-10-17 19:12:03 +00:00