Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Issue 14005 - core.exception.InvalidMemoryOperationError@(0) during ... #2880

Closed
wants to merge 1 commit into from

Conversation

aG0aep6G
Copy link
Contributor

...byLine

The problem was that readlnImpl assumed that it's safe to write beyond buf
when the GC block is large enough. That's not true. The space may already
be in use otherwise. In the original test case readlnImpl would write over
internal data of the GC at the end of the block.

…ng byLine

The problem was that readlnImpl assumed that it's safe to write beyond buf
when the GC block is large enough. That's not true. The space may already
be in use otherwise. In the original test case readlnImpl would write over
internal data of the GC at the end of the block.
@schveiguy
Copy link
Member

Please see already existing PR: #2794

@MartinNowak
Copy link
Member

Going to close this, because it shrinks the buffer which would lead to a repeated reallocation in the default use-case.

char[] buf;
while (readln(buf)) {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants