This is an archive of the discontinued LLVM Phabricator instance.

crash in MallocChecker
ClosedPublic

Authored by dkrupp on Dec 16 2016, 7:01 AM.

Details

Summary

Abramo Begnara reported a crash in MallocChecker.cpp
https://www.mail-archive.com/cfe-commits@lists.llvm.org/msg43052.html

For expressions like:
void f(int a, int b)
{

new char[a * b];

}
or
new unsigned[m + n + 1];

This patch includes the fix and the test case.

Diff Detail

Repository
rL LLVM

Event Timeline

dkrupp updated this revision to Diff 81751.Dec 16 2016, 7:01 AM
dkrupp retitled this revision from to crash in MallocChecker.
dkrupp updated this object.
zaks.anna edited reviewers, added: dergachev.a; removed: dcoughlin, zaks.anna.Dec 16 2016, 9:38 AM
dcoughlin accepted this revision.Dec 16 2016, 10:51 AM
dcoughlin added a reviewer: dcoughlin.
This revision is now accepted and ready to land.Dec 16 2016, 10:51 AM
This revision was automatically updated to reflect the committed changes.