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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 fix bus error on smaller readonly file in unix #44354

Merged
merged 10 commits into from
Aug 21, 2023
Prev Previous commit
Next Next commit
Update stdlib/Mmap/src/Mmap.jl
Co-authored-by: Stefan Karpinski <[email protected]>
  • Loading branch information
2 people authored and vtjnash committed Jul 18, 2023
commit bc0cdaa547db5fb582327c20f5fa1b232d8f06c3
3 changes: 1 addition & 2 deletions stdlib/Mmap/src/Mmap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ function mmap(io::IO,
file_desc = gethandle(io)
szfile = convert(Csize_t, len + offset)
requestedSizeLarger = false
if io isa Mmap.Anonymous
else
if !(io isa Mmap.Anonymous)
requestedSizeLarger = szfile > filesize(io)
end
# platform-specific mmapping
Expand Down