I just got a free(): invalid pointer in a rust program (while unwinding) so, yeah, I need a quick break
-
Prikaži ovu nit
-
the stack trace isn't even that suspicious!pic.twitter.com/jhr3RrCXB6
1 proslijeđeni tweet 3 korisnika označavaju da im se sviđaPrikaži ovu nit -
running it under valgrind works fine lolpic.twitter.com/HqngMomvSt
1 reply 0 proslijeđenih tweetova 6 korisnika označava da im se sviđaPrikaži ovu nit -
it's trying to free a bit of memory that belongs to a region mmapped from a file whatpic.twitter.com/Tpfszoc8m5
0 proslijeđenih tweetova 3 korisnika označavaju da im se sviđaPrikaži ovu nit -
ooh, LLDB shows more deets, looks like it crashes when dropping `delf::ProgramHeader`pic.twitter.com/UeSoWrYsSG
1 reply 0 proslijeđenih tweetova 2 korisnika označavaju da im se sviđaPrikaži ovu nit -
my current working theory is that one of my `mmap` calls is accidentally unmapping a previously-mapped region used as backing memory for a `Vec`, and when dropping the `Vec`, well, all hell breaks loose This only happens with large enough Vecs, so it didn't happen beforepic.twitter.com/QGyNt7TpiY
1 reply 0 proslijeđenih tweetova 3 korisnika označavaju da im se sviđaPrikaži ovu nit -
found the bug


pic.twitter.com/NDN3rf9Y1x
0 proslijeđenih tweetova 11 korisnika označava da im se sviđaPrikaži ovu nit -
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
1 reply 0 proslijeđenih tweetova 11 korisnika označava da im se sviđaPrikaž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
1 reply 0 proslijeđenih tweetova 5 korisnika označava da im se sviđaPrikaž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
-
-
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
0 proslijeđenih tweetova 6 korisnika označava da im se sviđaPrikaži ovu nit -
tl;dr we need a "unfuckingsafe" keyword for the https://crates.io/crates/mmap crate
0 proslijeđenih tweetova 9 korisnika označava da im se sviđaPrikaži ovu nit
Kraj razgovora
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