[HN Gopher] Debugging a Crash in OpenRCT2
       ___________________________________________________________________
        
       Debugging a Crash in OpenRCT2
        
       Author : elvis70
       Score  : 40 points
       Date   : 2023-01-20 06:25 UTC (1 days ago)
        
 (HTM) web link (voidstar.tech)
 (TXT) w3m dump (voidstar.tech)
        
       | DonutLord9 wrote:
       | Would Valgrind have found this nearly instantly?
        
         | jey wrote:
         | In theory, yes. But in practice, it probably would be hard to
         | reproduce the bug while running 30x slower than normal. On the
         | other hand, maybe computers today are fast enough to run
         | OpenRCT2 under valgrind-memcheck?
        
       | vore wrote:
       | I wonder if compiling the game with ASAN would have helped here,
       | saving a lot of manual digging for out of bounds accesses.
        
         | delusional wrote:
         | That's already covered in the article:
         | 
         | > Assuming the bad index was always present, I thought I might
         | catch it by instrumenting accesses to global arrays. Using ASan
         | was a possibilty, but I believed enabling checking globally on
         | a program full of unrelated memory issues would be too noisy to
         | be of use.
        
       | Scaevolus wrote:
       | I wonder if the bug was present in the initial game, or if the
       | boolean test was accidentally inverted during reverse
       | engineering.
        
         | angus-g wrote:
         | Sounds like a refactor error, from the linked Issue:
         | https://github.com/OpenRCT2/OpenRCT2/issues/16572#issuecomme...
        
       ___________________________________________________________________
       (page generated 2023-01-21 23:00 UTC)