[Issue 15809] New: Putting std.stdio.File.ByLine ina class causes Invalid memory operation upon exit
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Mar 18 12:04:24 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15809
Issue ID: 15809
Summary: Putting std.stdio.File.ByLine ina class causes Invalid
memory operation upon exit
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: regression
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: hsteoh at quickfur.ath.cx
Reduced code:
------
import std.stdio;
class Wrapper
{
typeof(stdin.byLine()) src;
}
void main()
{
auto x = new Wrapper();
x.src = stdin.byLine();
}
------
Compiled with git HEAD, upon program exit, the following error is triggered:
------
core.exception.InvalidMemoryOperationError at src/core/exception.d(693): Invalid
memory operation
------
Commenting out the second line in main() makes the problem go away.
Works with older releases of dmd toolchain.
--
More information about the Digitalmars-d-bugs
mailing list