Bug 16512 – std.allocator: Nullify the argument passed to allocator.dispose

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-09-19T19:16:19Z
Last change time
2017-10-16T09:57:35Z
Assigned to
No Owner
Creator
Yuxuan Shui

Comments

Comment #0 by yshuiv7 — 2016-09-19T19:16:19Z
A good measure to prevent use-after-free.
Comment #1 by dlang-bugzilla — 2017-07-18T13:07:30Z
I understand this to be a std.allocator enhancement request (not a dmd issue as originally filed), so I've updated the issue accordingly. Please update it if I'm wrong.
Comment #2 by github-bugzilla — 2017-09-08T13:48:11Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/63ed59ffc7b2605eeadef009484817e6103c689a fix issue 16512 - Nullify the argument passed to allocator.dispose https://github.com/dlang/phobos/commit/2b0ae1f2196c072e1b7b63a9e639b1bdda87c386 Merge pull request #5706 from BBasile/issue-16512 fix issue 16512 - Nullify the argument passed to allocator.dispose
Comment #3 by github-bugzilla — 2017-10-16T09:57:35Z
Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/63ed59ffc7b2605eeadef009484817e6103c689a fix issue 16512 - Nullify the argument passed to allocator.dispose https://github.com/dlang/phobos/commit/2b0ae1f2196c072e1b7b63a9e639b1bdda87c386 Merge pull request #5706 from BBasile/issue-16512