How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
111–120 of 315 posts
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#112My takeaway, speaking as someone who leans towards functional programming and immutability, is "this is yet another example of a mutability problem that could never happen in a functional context" (so, for example, this bug would have never been created by Rust unless it was deeply misused)
Rust protects you from external file data you read being incorrect? That's one hell of a language!
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#113Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#114Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#115My takeaway, speaking as someone who leans towards functional programming and immutability, is "this is yet another example of a mutability problem that could never happen in a functional context" (so, for example, this bug would have never been created by Rust unless it was deeply misused)
Rust protects you from external file data you read being incorrect? That's one hell of a language!
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#116IMHO, if something isn’t part of the contract, it should be randomized. Eg if iteration order of maps isn’t guaranteed in your language, then your language should go out of its way to randomize it. Otherwise, you end up with brittle code: code that works fine until it doesn’t.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#117IMHO, if something isn’t part of the contract, it should be randomized. Eg if iteration order of maps isn’t guaranteed in your language, then your language should go out of its way to randomize it. Otherwise, you end up with brittle code: code that works fine until it doesn’t.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#118> Not ignore the compilation warnings – this code most likely threw a warning in the original code that was either ignored or disabled! What compiler error would you expect here? Maybe not checking the return value from scanf to make sure it matches the number of parameters? Otherwise this seems like a data file error that the compiler would have no clue about.
Undefined behavior to access the uninitialized memory. A sanitizer would have flagged that.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#119> Not ignore the compilation warnings – this code most likely threw a warning in the original code that was either ignored or disabled! What compiler error would you expect here? Maybe not checking the return value from scanf to make sure it matches the number of parameters? Otherwise this seems like a data file error that the compiler would have no clue about.
Undefined behavior to access the uninitialized memory. A sanitizer would have flagged that.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#120My takeaway, speaking as someone who leans towards functional programming and immutability, is "this is yet another example of a mutability problem that could never happen in a functional context" (so, for example, this bug would have never been created by Rust unless it was deeply misused)