-
David Griffith authored
detecting attempts to address an invalid object. Beyond Zork release 60 contains a bug wherein the dictionary entry for the circlet is incorrectly treated as an object when blown. This turned out to be object number 41460 (or similar). Its entry in the object table would reside far outside the expanse of memory the Z-machine can access. Infocom's interpreter simply returns zero when the zcode checked what turns out to be an invalid object and the game continues running as if nothing was wrong. Back when Zip was current, this bug was worked around by checking if the game is Beyond Zork and the object number was over an arbitrarily large number (2000) and if so just return zero. I rewrote this code to check ALL accesses to the object table, throw a fatal error if the access is invalid, and return zero if the game happens to be Beyond Zork. See these resources for more information: https://ifarchive.org/if-archive/infocom/interpreters/zip/zip_bugs.txt https://intfiction.org/t/beyond-zork-passing-invalid-values-to-get-prop-addr/48347 https://intfiction.org/t/z-machine-undefined-behavior/44990 https://intfiction.org/t/z-machine-standard-unclear-aspects-ambiguities/64128
b3435066David Griffith authoreddetecting attempts to address an invalid object. Beyond Zork release 60 contains a bug wherein the dictionary entry for the circlet is incorrectly treated as an object when blown. This turned out to be object number 41460 (or similar). Its entry in the object table would reside far outside the expanse of memory the Z-machine can access. Infocom's interpreter simply returns zero when the zcode checked what turns out to be an invalid object and the game continues running as if nothing was wrong. Back when Zip was current, this bug was worked around by checking if the game is Beyond Zork and the object number was over an arbitrarily large number (2000) and if so just return zero. I rewrote this code to check ALL accesses to the object table, throw a fatal error if the access is invalid, and return zero if the game happens to be Beyond Zork. See these resources for more information: https://ifarchive.org/if-archive/infocom/interpreters/zip/zip_bugs.txt https://intfiction.org/t/beyond-zork-passing-invalid-values-to-get-prop-addr/48347 https://intfiction.org/t/z-machine-undefined-behavior/44990 https://intfiction.org/t/z-machine-standard-unclear-aspects-ambiguities/64128
To find the state of this project's repository at the time of any of these versions, check out the tags.
Loading