This work immediately found its way into bughunt-rust:https://github.com/blt/bughunt-rust/commit/12e25c218ae538ca4c365fb56630c47b0e250ec1 …
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
What about alignment? Is that handled by rust directly rather than the allocator? Eg box a byte then box some wider structure, how is the structure aligned?
-
Hi! That’s totally left up to the allocator. https://github.com/blt/bh_alloc/blob/master/src/lib.rs#L63 … is only checking for the size needed and doing nothing to round up to fit word alignment.
-
I did have some extra branches to do proper alignment but my fuzz targets weren’t appreciably faster and the fuzzer had more branches to get lost in, so I stripped all that out.
-
I should drop a comment in the code to explain why bh_alloc isn’t aligning along words. That is something you’d normally expect an allocator to do and it’s surprising, in retrospect, for bh_alloc to be unconcerned with that.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.