3 ms·
Sim City for Windows 3.x would read memory it recently freed. This never crashed the program because Windows 3.x was more like a graphical shell on top of DOS.
by bena 5y ago
Sim City for Windows 3.x would read memory it recently freed.
This never crashed the program because Windows 3.x was more like a graphical shell on top of DOS. It wasn't a true multi-user or multi-tasking operating system. If you released memory, there wasn't anything else waiting to grab it from you. So the fact that you shouldn't read memory that's been freed, it went unnoticed.
Until they tried to run it on Windows 95. Then it would crash. A lot. The game was unplayable. Because Windows 95 was a multi-tasking operating system and it would reallocate freed memory to other programs that may ask for it.
So they put a specific check in Windows 95 to see if Sim City is running. And if it was, they essentially sandboxed its memory so nothing else could grab any memory it used.
While in this case, this isn't an example of a bug that was intentionally left in, it is an example of code written into an operating system to handle the bug of a single program.
But that's how they'd handle it. If PROGRAM X required certain behavior, they'd check to see if that program was running and alter behavior so the program would run. If feels like that's like half of what the registry is for.