memmap-rs
                                
                                 memmap-rs copied to clipboard
                                
                                    memmap-rs copied to clipboard
                            
                            
                            
                        avoid silently truncating the offset
This should address one of the concerns that came up in https://github.com/danburkert/memmap-rs/pull/65.
I'm not sure exactly what test I should add for this case. Please advise :)
I expected that the fix to this would be to use mmap64 instead of mmap (on select platforms), or is that infeasible?
That definitely sounds like the better fix where it's possible, but I don't know how wide mmap64 support is. The libc crate doesn't seem to support it for macOS or any of the other BSD variants. Do you think we should start calling that function on Linux, as part of this PR? A couple of thoughts:
- Because off64_tis ani64, but our offset parameter is au64, we'll still need to check for overflow when we cast it.
- It looks like emscripten perversely defines off64_tasi32. I assumemmapfails under emscripten anyway, but if there might be more platforms in the future doing this, we might not want to assumeoff64_tis actually always 64 bits.