• SorryQuick
    link
    fedilink
    arrow-up
    4
    arrow-down
    2
    ·
    edit-2
    16 hours ago

    The whole point of a segfault is that you can’t really know anything about it. Even in rust, when you get a segfault there is no meaningful error.

    • WhyJiffie@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      2
      ·
      4 hours ago

      point is, Rust manages to give you not a segfault but a meaningful error almost all the time until you use unsafe

      • SorryQuick
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        2 hours ago

        If you’re getting a segfault in C++, it’s also cause you used unsafe code. It’s just not officially enclosed in an “unsafe” block.