DynamoRIO / DynamoRIO/drmemory

INVALID HEAP ARGs in pdfium because new instead of new[] is called by VS2013

Open
#1,828 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.