-
Notifications
You must be signed in to change notification settings - Fork 15
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
Buffer Overflow during precompile #189
Comments
Minimal reproducer: |
Seems like we should also be using |
Hmmmm, interesting. Yes, I've definitely been assuming that a Does just changing teh ccall argument from |
returns nothing on 1.10.2 whilst on 1.11-alpha2 it returns numbers below 100. I'm having a little trouble with my asan build right now, but I see this on 1.11-alpha2 so I don't think just changing julia> a = for i in 1:10^7
a = Vector(codeunits("123"))
ptr = pointer(a)
Base.unsafe_load(ptr)
Base.unsafe_load(ptr+1)
Base.unsafe_load(ptr+2)
if Base.unsafe_load(ptr+3) != 0
return a
end
end
3-element Vector{UInt8}:
0x31
0x32
0x33
julia> unsafe_string(Base.cconvert(Cstring, pointer(a)))
"123\xec\xff\x7f" Oddly, there is no |
Specifically, it seems to be the call to
mpfr_strtofr
added in 504dfdf.See JuliaLang/julia#53898 for more info.
https://gitlab.inria.fr/mpfr/mpfr/-/blob/4.2.0/src/strtofr.c?ref_type=tags#L326 is the line where the error occurs,
Are we missing the null terminator?
The text was updated successfully, but these errors were encountered: