Introduced by https://github.com/D-Programming-Language/druntime/pull/1447.
https://github.com/D-Programming-Language/druntime/pull/1519
*** Issue 15809 has been marked as a duplicate of this issue. ***
*** Issue 15821 has been marked as a duplicate of this issue. ***
*** Issue 15808 has been marked as a duplicate of this issue. ***
Commits pushed to stable at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/d23d7efb3649cd543e8d0b10b9a32ab3325f5cd0 fix Issue 15822 - InvalidMemoryOperationError when calling GC.removeRange/Root from a finalizer - use separate locks for GC.add/removeRange/Root - avoids GC.lock contention for manual memory management https://github.com/D-Programming-Language/druntime/commit/c6ac077a8d544fab65b1973b385c6f479697fb0e Merge pull request #1519 from MartinNowak/fix15822 fix Issue 15822 - InvalidMemoryOperationError when calling GC.removeRange/Root from a finalizer
This bug has not yet been (fully) fixed: ------ import std.stdio; class Wrapper { typeof(stdin.byLine()) src; } void main() { auto x = new Wrapper(); x.src = stdin.byLine(); } ------ Run as 'echo | ./program'. Output: ------ core.exception.InvalidMemoryOperationError@src/core/exception.d(693): Invalid memory operation ------
(In reply to hsteoh from comment #6) > This bug has not yet been (fully) fixed: > > ------ > import std.stdio; > class Wrapper > { > typeof(stdin.byLine()) src; > } > void main() > { > auto x = new Wrapper(); > x.src = stdin.byLine(); > } > ------ > > Run as 'echo | ./program'. Output: > > ------ > core.exception.InvalidMemoryOperationError@src/core/exception.d(693): > Invalid memory operation > ------ Works for me. Are you testing with stable?
Oh, was this only fixed in stable? I'm testing with latest git HEAD.
(In reply to hsteoh from comment #8) > Oh, was this only fixed in stable? Yup. > I'm testing with latest git HEAD. I'm closing as fixed again, assuming it works for you with stable.
Why aren't we fixing this in git HEAD?!
(In reply to hsteoh from comment #10) > Why aren't we fixing this in git HEAD?! It's a regression. Those are fixed against stable, from which point releases are built. As far as I understand, stable is merged back into master from time to time (don't know if there are any rules about it). So the fix should reach master eventually.
Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/d23d7efb3649cd543e8d0b10b9a32ab3325f5cd0 fix Issue 15822 - InvalidMemoryOperationError when calling GC.removeRange/Root from a finalizer https://github.com/D-Programming-Language/druntime/commit/c6ac077a8d544fab65b1973b385c6f479697fb0e Merge pull request #1519 from MartinNowak/fix15822
Thanks!!
Commits pushed to dmd-cxx at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/d23d7efb3649cd543e8d0b10b9a32ab3325f5cd0 fix Issue 15822 - InvalidMemoryOperationError when calling GC.removeRange/Root from a finalizer https://github.com/dlang/druntime/commit/c6ac077a8d544fab65b1973b385c6f479697fb0e Merge pull request #1519 from MartinNowak/fix15822