Bug 8694 – std.zlib.(Un)Compress can cause an _onInvalidMemoryOperationError

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-09-19T02:53:00Z
Last change time
2015-06-09T05:15:18Z
Assigned to
nobody
Creator
sludwig

Comments

Comment #0 by sludwig — 2012-09-19T02:53:20Z
The finalizers are calling error() inside ~this() if deflateEnd() returns an error. error() in turn tries to 'new' an exception, which then causes the invalid memory operation error.
Comment #1 by sludwig — 2012-09-19T03:16:12Z
Comment #2 by github-bugzilla — 2012-09-28T06:41:13Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/a84271845b8ac247be1a462c3020e8a974ff78c3 fix Issue 8694 - (Un)Compress may cause an InvalidMemoryOperationError The calls to error() are removed from the finalizers to avoid memory allocations there. The result does not matter at this point anyway since nothing can be done about it. https://github.com/D-Programming-Language/phobos/commit/b05b81859610e31b679de6e8cc2001fc14fe5af5 Merge pull request #806 from s-ludwig/patch-1 Fix for issue 8694, (Un)Compress may cause an InvalidMemoryOperationError
Comment #3 by yebblies — 2013-01-02T00:39:24Z
Has this been fixed sufficiently?
Comment #4 by sludwig — 2013-01-02T00:41:16Z
Yes, sorry. Fogot to close the issue.