Elektrine lite

← Feed

@llogiq@hachyderm.io

Post #2699365

2025-09-24 14:44 UTC

@jakub_neruda@techhub.social @Mara@hachyderm.io I agree that logic bugs are a problem even in Rust – although in my experience they are easy to find. i use assertions liberally, so if the data flow fails to fit my mental model, I will get a panic with useful information. Conversely, memory bugs may be masked by the allocator (depending on the system) or only ever become visible in uncommon circumstances. Running ASAN is great practice, but even that will only check all the code paths that have been taken during the test run with the given data. Tools can usually only detect the presence of bugs, not their absence.

Replies (1)

  • @jakub_neruda@techhub.social 2025-09-24 18:44

    @llogiq@hachyderm.io @Mara@hachyderm.io I see very little difference between memory bug that crashes the program and assertion macro that crashes the program. But my view might be skewed due to working a great deal with Windows ecosystem and MSVC - if Microsoft has perfected anything about their system, its crash dumps. They contain all parallel stacks, all unoptimized variables, shows the actual source code (when symbols are appropriately provided). Therefore, I likely have comparable amount of information as you do, even if the crash happened on the customer environment. I agree with your point about tools being able to detect presence of bugs, not their absence, I was mainly questioning the economy. If maintaining the tool costs way more than dealing with occasional bug, then I am not going to use the tool, even if it sounds really stupid said out loud like this.

    Open ##2699366