I just got a free(): invalid pointer in a rust program (while unwinding) so, yeah, I need a quick break
-
-
lessons learned: - don't write articles while extremely tired
- mmap with MAP_FIXED is *way dangerous*
- using LLDB for day-to-day stuff sounds worth it
Prikaži ovu nit -
Okay, after some additional bug-hunting, https://fasterthanli.me/blog/2020/dynamic-symbol-resolution/ … is all fixed up and our codebase should *not* blow up the minute we run it on real-world executables
Prikaži ovu nit -
There was another subtle bug btw: malloc/free misuse is SO EASY to identify as compared to mmap misuse. The memory manager will happily unmap crucial stuff from under you and it'll blow up way later.pic.twitter.com/Z4UANRnq6g
Prikaži ovu nit -
The worst part is that you can't really write a sanitizer for mmap mis-use because remapping regions is 100% legitimate usage and something the dynamic linker does a bunch
Prikaži ovu nit -
tl;dr we need a "unfuckingsafe" keyword for the https://crates.io/crates/mmap crate
Prikaži ovu nit
Kraj razgovora
Novi razgovor -
-
-
So, I'm curious, is there some unsafe{} code somewhere that's using a value derived from this and not checking it? Or that's used as input here?
-
There is, in an extern crate, that calls out to C code, and all C code is unsafe: https://github.com/rbranson/rust-mmap/blob/f973ae1969b4b7e8045cf0d21e0a2d1b3cf9941c/src/lib.rs#L231-L234 …
- Još 8 drugih odgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.
rust, go, compilers, music, gamedev
donate:
watch:
he/him
