-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Invalid write(io::IO, s::String)
method
#23520
Labels
GC
Garbage collector
Comments
We should probably audit all uses of |
yuyichao
added a commit
that referenced
this issue
Sep 28, 2017
yuyichao
added a commit
that referenced
this issue
Sep 28, 2017
yuyichao
added a commit
that referenced
this issue
Sep 28, 2017
yuyichao
added a commit
that referenced
this issue
Sep 28, 2017
yuyichao
added a commit
that referenced
this issue
Sep 28, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The method definition
is invalid since it is not guaranteed that the
s
will be kept alive when this function is inlined.In particular, this cases
@code_llvm show(IOBuffer(), 4)
to be invalid(Note that the return value of
dec
is passed tounsafe_write
without being rooted).This may show up as intermittent test failure with
UndefVarError(t_...)
since it can cause the"t_$i"
to return the wrong value and messes up lowering. (Not sure if this shows up on CI but I've hit it multiple times in ~1 day of GC stress testing)We can workaround this for now by adding
@noinline
although it'll be nice if we can fix this with some kind of GC preserve scope for a certain object.The text was updated successfully, but these errors were encountered: