Stream: contributing

Topic: Dict is probably broken


view this post on Zulip Brian Hicks (Sep 21 2022 at 14:45):

just an FYI: looks like the changes I made to Dict in the last couple weeks do not work out so well in practice (all sorts of weird memory addresses when @Ilias Van Peer and I tried to use it just now.) I'm gonna spend some time later cuddled up with lldb and to figure it out.

view this post on Zulip Ayaz Hafiz (Sep 21 2022 at 14:48):

May be worth also looking at the LLVM code generated on the rust side (cargo rustc -- --emit=llvm-ir), vs the LLVM roc generates (roc build ... --debug) - I've found that helpful for initial debugging of ABI bugs

view this post on Zulip Brian Hicks (Sep 21 2022 at 15:09):

mmm, I'll keep that in mind. I think in this case it's probably just bad accesses inside that RocDictItem union. We were putting "HELLO" in a string, for example, and getting segfaults when we tried to read 0x4f4c4c4548 (OLLEH)

view this post on Zulip Brian Hicks (Sep 21 2022 at 15:10):

(well it was masking the H but you get the idea. Using a small string as an address, which means we probably weren't reading the right offset into the memory)

view this post on Zulip Ayaz Hafiz (Sep 21 2022 at 15:11):

that makes sense


Last updated: Jul 06 2025 at 12:14 UTC