• zaphod@sopuli.xyz
    link
    fedilink
    arrow-up
    1
    ·
    12 hours ago

    I searched for about six weeks how to fix that and it disappeared when I changed the position of the program’s data segment.

    So it was a linker issue? I wouldn’t call that undefined behaviour in multithreaded code.

    But industry is still working with a fifty year old language written for systems where 32 kilobytes were a lot of memory.

    Especially for embedded and DSP stuff there are so many architectures that aren’t even supported by the Rust compiler. And on those systems 32 kiB of RAM is sometimes a lot of memory.

    • HaraldvonBlauzahn@feddit.orgOP
      link
      fedilink
      arrow-up
      1
      ·
      7 hours ago

      So it was a linker issue?

      No, that would have resulted in a linker error, not random undefined behaviour

      But industry is still working with a fifty year old language written for systems where 32 kilobytes were a lot of memory.

      Especially for embedded and DSP stuff there are so many architectures that aren’t even supported by the Rust compiler. And on those systems 32 kiB of RAM is sometimes a lot of memory.

      These niches still exist but they get rapidly smaller every year. Because:

      • Cheap hardware gets more powerful
      • Demands rise… even some electric toothbrushes are networked now
      • Rust support for embedded devices is rapidly expanding

      Plus:

      • In some domains, security is becoming a real issue