https://d.puremagic.com/issues/show_bug.cgi?id=11646
Summary: [snn] `malloc` is unstable for large allocations
Product: D
Version: D2
Platform: All
OS/Version: Windows
Status: NEW
Keywords: wrong-code
Severity: major
Priority: P2
Component: druntime
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Denis Shelomovskij <[email protected]> 2013-11-30
13:54:26 MSK ---
There are integer overflows in snn's `malloc` for large allocations:
---
import core.stdc.stdlib;
void main()
{
assert(!malloc(-1)); // Assertion failure
assert(!malloc(0xD5550000)); // OK
assert(!malloc(0xD5560000)); // Access violation in RTLHeapBlock::Reclaim
}
---
Yes, it really thinks it can allocate `size_t.max` bytes.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------