Hi All,
MallocChecker::addExtentSize() assumes that the region returned by CXXNewExpr is ElementRegion, but when the custom operator new [] is inlined, the region returned is not necessarily an ElementRegion.
Given the below code sippet:
#include <stdlib.h> void *operator new[](std::size_t size) { void *p = malloc(size); return p; } int main() { int *ptr = new int[10]; }
When operator new[] is inlined, the return region is Symbolic Region, which violates the MallocChecker::addExtentSize() assumption.