Integer overflow: Difference between revisions

Content deleted Content added
Pakiyeetus (talk | contribs)
Tags: Reverted Disambiguation links added
Undid revision 1273272789 by Pakiyeetus no mention of integer overflow in the source
Line 131:
 
In the [[Super Nintendo Entertainment System]] (SNES) game [[Lamborghini American Challenge]], the player can cause their amount of money to drop below $0 during a race by being fined over the limit of remaining money after paying the fee for a race, which glitches the integer and grants the player $65,535,000 more than it would have had after going negative.<ref>Archived at [https://ghostarchive.org/varchive/youtube/20211205/aNQdQPi0xMo Ghostarchive]{{cbignore}} and the [https://web.archive.org/web/20190726012137/https://www.youtube.com/watch?v=aNQdQPi0xMo&t=17m55s Wayback Machine]{{cbignore}}: {{cite web |url=https://www.youtube.com/watch?v=aNQdQPi0xMo&t=17m55s |title=Lamborghini American Challenge SPEEDRUN (13:24) |website=[[YouTube]]|date=14 March 2019 }}{{cbignore}}</ref>[[File:Error message due to an integer signedness bug in the stack setup code of MASM 1.00.gif|thumb|An integer signedness bug in the stack setup code emitted by the [[Pascal (programming language)|Pascal]] compiler prevented IBM–[[Microsoft Macro Assembler]] (MASM) version 1.00, a [[DOS]] program from 1981, and many other programs compiled with the same compiler, to run under some configurations with more than 512 KiB of memory.]]
 
In the [[PlayStation 2]] game [[Gran Turismo 3: A-Spec]], the player can perform a "[[wheelie]]" with [[Nobuhiro Tajima]]'s [[Suzuki Escudo]] V6 by tuning the car's [[downforce]] to create lift at the front end. Due to coding of the game preventing flipover of the car, it will create a circular effect of downforce rising the front. This causes the vehicle to take lift, subsequently causing the game to mistakenly process falling speed, disabling resistance to acceleration. This will cause it to reach [[2147483647]] [[mph]]<ref>https://gamefaqs.gamespot.com/top10/3071-the-top-10-fastest-cars-in-video-games</ref>, thusly crashing the game on actual hardware.
 
IBM–[[Microsoft Macro Assembler]] (MASM) version 1.00, and likely all other programs built by the same [[Pascal (programming language)|Pascal]] compiler, had an integer overflow and signedness error in the stack setup code, which prevented them from running on newer [[DOS]] machines or emulators under some common configurations with more than 512&nbsp;KiB of memory. The program either hangs or displays an error message and exits to DOS.<ref>{{cite web |last=Lenclud |first=Christophe |url=https://slions.net/threads/debugging-the-ibm-personal-computer-macro-assembler-masm-version-1-00.33/ |title=Debugging IBM MACRO Assembler Version 1.00|date=21 April 2017 }}</ref>