[LLVMbugs] [Bug 19948] New: new[]/delete mismatch
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jun 5 01:17:38 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19948
Bug ID: 19948
Summary: new[]/delete mismatch
Product: libc++
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: antognini.marco at gmail.com
CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
Classification: Unclassified
While discovering a bug in cpputest [1] it seems there is another bug but in
libc++ this time.
Throwing a `std::runtime_error` or a `std::logic_error` results in an
allocation/deallocation type mismatch.
According to the standard it's UB to free with `delete` a memory portion
allocated with `new[]`.
The full code is available at [1] but I suspect the relevant instructions being
only:
throw std::runtime_error("foo");
NB: I've installed llvm with clang and related tools with homebrew on Mac. [2]
show the complete procedure I used (since there are bugs in homebrew formula
too).
Let me know if you needs more information.
[1] https://github.com/cpputest/cpputest/issues/302
[2]
https://github.com/Homebrew/homebrew-versions/issues/340#issuecomment-44869424
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140605/6b176ed9/attachment.html>
More information about the llvm-bugs
mailing list