DynamoRIO / DynamoRIO/drmemory
INVALID HEAP ARGs in pdfium because new instead of new[] is called by VS2013
Open
Bug-FalsePositive
OpSys-Windows
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
xref https://bugs.chromium.org/p/pdfium/issues/detail?id=287
The VS2013 uses new instead of new[], but keeps using delete[] for the code below:
```
template
void NumberlikeArray::allocate(Index c) {
// If the requested capacity is more than the current capacity...
if (c > cap) {
// Delete the old number array
delete [] blk;
// Allocate the new array
cap = c;
blk = new Blk[cap];
}
}
```
It cause Dr. Memory reports INVALID HEAP ARGs errors.
Similar issue at issue #643.
Contributor guide
Assessment
This issue has not been assessed yet.