3 ms·
This is hands down the worst Old New Thing he ever wrote. He either is, or at least should be, ashamed of the poor engineering his colleagues are doing, and try
by jeffrallen 1y ago
This is hands down the worst Old New Thing he ever wrote. He either is, or at least should be, ashamed of the poor engineering his colleagues are doing, and trying weakly to defend them.
Monkeying with critical sections is hard. Monkeying with them due to performance and memory optimization while maintaining correctness is incredibly hard. If they'd done a good job of it, no one would have noticed, and Raymond would have had a cool story to tell. Instead we got this.
Sigh, Microsoft, what's happening over there?
- spookie 1y agoNever break user-space and all
- jofla_net 1y agoAfter a while that kool-aid, chilled to optimum temperature, on infinite tap, becomes an aqueous sanctuary, even the most staunch hold-outs cannot resist.
- wat10000 1y agoIf they’d done a good job, they wouldn’t have made a change that used a little more stack space and triggered an old bug where GTA used an uninitialized local variable? Huh?
- toast0 1y agoPerhaps not, but setting the compatability mode should maybe get programs that worked before to work again. Using extra stack space has got to be on a list of things likely to cause trouble.
- wat10000 1y agoSo adding a local variable to any function in the system needs to be considered dangerous, and have a way to run an old version of that function that doesn’t have a new local variable? How could that possibly be practical?
- toast0 1y agoIf compatability is important, it should at least be considered. For 20 years, this particilar system function did not touch that part of the stack, and GTA used it. In real estate, after ten years, GTA would have a prescriptive easement under Washington State law. :P
- wat10000 1y agoIt’s just not feasible, unless your plan is not to change anything at all. When you have apps doing things like relying on values in uninitialized memory, literally any change anywhere can potentially break them. A company like Microsoft that cares about compatibility will test third party apps to try to catch this sort of thing, but there’s only so much testing you can do. It’s not feasible to test games from two decades prior so throughly that you’d notice that one particular vehicle never spawns.
- toast0 1y agoI don't mind that they didn't find this, it would have been hard to find it, given the situation. But it's still kind of bogus that compatability mode doesn't make things compatible.
- wat10000 1y agoThat wouldn’t be compatibility mode, that would be shipping an entire copy of an older OS version. From a quick search, it looks like compatibility mode entails interposing a library between the app and the OS libraries, and the library emulates the behavior of an older OS. It’s not automated, each compatibility fix is crafted to work around a specific issue. In theory a fix could be made for this issue, but they’d have to find it and debug it first.
- sudosysgen 1y agoBut they did a good job of it? The change of behavior is San Andreas is due to an invalid memory access reading out of bounds into an area of the stack that was only coincidentally initialized by a previous iteration. They didn't make any changes in correctness. The game itself is broken, and it's normal to undefined behavior from out of bounds accesses will change between OS versions, even just for security reasons. In fact, other versions of the game did fix this bug in a patch, it just didn't get picked because people go out of their way to downgrade the game in order to maintain some cut assets and features.
- mherkender 1y ago'No Way To Prevent This', says only OS where this regularly happens.
- detaro 1y agoWhich other OSes prevent this consistently?
- mherkender 1y agoOpen-source Linux is great at updating old software. Most other OSes (Android, MacOS, iOS, game consoles) rely on versioning, which makes it easier to provide compatibility layers or at least know when a piece of software just isn't supported anymore. Personally I think Windows should have specialized VMs for old software, so they can be compatible forever even if they have bugs.
- detaro 1y agoSo other OSes prevent this by not even trying to run old software? Yeah, not particularly helpful
- mherkender 1y agoBetter to have a strategy for software compatibility and evolution vs Microsoft's strategy of doing nothing. Pretty much every game console ever made still works with every game for that console, but when it's Windows you never know.
- zaphar 1y agoWhat? They did in fact maintain correctness. GTA was emphatically in the wrong here and only accidentally worked for a long time because of some internals of the CriticalSection code that they didn't even know they were depending on. The changes to that code didn't modify correctness. The issue was that GTA was relying on undefined behavior. GTA didn't know they had a bug because the undefined behavior happened to be in their favor for a long time. But it's a minor miracle that it hadn't broken before this in a myriad of other ways.
- sudosysgen 1y agoRockstar actually did fix this bug some years ago, but because some content was removed, people instead downgrade to an earlier version that still has the bug and rely on community patches.
- diath 1y agoPlease read the original article that this is in response to. The poor engineering was on Rockstar's side.