site: devblogs.microsoft.com
The history of computing, as told by the hallways of Microsoft Building 41
https://devblogs.microsoft.com/oldnewthing/20240402-00/?p=109604 [devblogs.microsoft.com]
2024-04-09 23:52
tags:
architecture
design
tech
valley
Each of the six floors of Building 41 is themed after a stage in the development of computing.
The case of the application that used thread local storage it never allocated
https://devblogs.microsoft.com/oldnewthing/20221128-00/?p=107456 [devblogs.microsoft.com]
2024-03-15 22:42
tags:
bugfix
concurrency
development
malloc
programming
windows
Upon closer inspection, the real problem was not that the application’s TLS was being corrupted. The problem was that the application was using TLS slots it never allocated, so it was inadvertently using somebody else’s TLS slots as its own. And of course, when the true owner updated the TLS value, the application interpreted that as corruption.
2022 year-end link clearance
https://devblogs.microsoft.com/oldnewthing/20221230-01/?p=107629 [devblogs.microsoft.com]
2023-01-27 18:39
tags:
links
The case of the failed exchange of the vtable slot
https://devblogs.microsoft.com/oldnewthing/20220429-00/?p=106543 [devblogs.microsoft.com]
2022-05-04 20:24
tags:
bugfix
cxx
malloc
programming
windows
This shell extension is trying to detour the operating system, and it failed. (Note that Windows does not support apps detouring the operating system. This shell extension has exited into unsupported territory.)
The Applesoft Compiler (TASC): We have the source code, in a sense
https://devblogs.microsoft.com/oldnewthing/20220419-00/?p=106496 [devblogs.microsoft.com]
2022-04-19 22:55
tags:
compiler
mac
programming
retro
Chaining was a common technique when your program got too large to fit into memory all at once, so you broke it into multiple programs that each handed off control to each other.
As the author added features, he kept hitting the Apple ][‘s 48KB RAM limit and was forced to delete all the comments from the code, and when that wasn’t enough, he resorted to shortening all the important variable names to one character.
How did I find the old Windows binaries and compilers for the processor retrospective series?
https://devblogs.microsoft.com/oldnewthing/20210111-00/?p=104699 [devblogs.microsoft.com]
2021-01-14 06:49
tags:
investigation
windows
I start by downloading the processor documentation from the manufacturer and reading through the entire instruction set. That teaches me about the processor architecture in general. The next step is seeing how Windows uses it.
That part usually starts with digging out the Windows NT installation CD for the relevant architecture and extracting the NOTEPAD.EXE program. I choose Notepad because it’s relatively small, or at least it was relatively small at the time. Furthermore, I have an old copy of the source code, which makes the reverse-compiling easier. The source code I have doesn’t always perfectly match the build of Windows that the CD was created from, but it’s usually close enough.
How can CharUpper and CharLower guarantee that the uppercase version of a string is the same length as the lowercase version?
https://devblogs.microsoft.com/oldnewthing/20200804-00/?p=104040 [devblogs.microsoft.com]
2020-08-05 00:49
tags:
c
intro-programming
text
text
windows
Stupid std::tuple tricks: Getting started
https://devblogs.microsoft.com/oldnewthing/20200622-00/?p=103880 [devblogs.microsoft.com]
2020-07-01 01:57
tags:
cxx
programming
series
Blaming the operating system for allowing people to create files with unusual characters in their names
https://devblogs.microsoft.com/oldnewthing/20200617-00/?p=103870 [devblogs.microsoft.com]
2020-06-18 01:09
tags:
fs
security
sh
windows
What we have here is a case of creating an insecure system and then being surprised that the system is insecure.
This is all too common, but the fix is equally shortsighted. Always too much focus on narrow aspect of the problem.
They claimed that the issue could be fixed by simply adding the ampersand to the list of illegal file name characters. They forgot about the percent sign (for injecting environment variables), the caret (for escaping), and possibly even the apostrophe.
Inside std::function
https://devblogs.microsoft.com/oldnewthing/20200513-00/?p=103745 [devblogs.microsoft.com]
2020-05-17 03:25
tags:
cxx
programming
Pulling sleight of hand tricks in a security vulnerability report, or maybe it was a prank
https://devblogs.microsoft.com/oldnewthing/20200401-00/?p=103623 [devblogs.microsoft.com]
2020-04-01 23:32
tags:
development
security
windows
So you tell me: Was this somebody carrying out an elaborate prank or somebody who simply didn’t understand what they were doing?
Whether it was intended as such or not, this ended up being an effective denial-of-service attack against me personally, since I ended up spending quite a bit of time watching the videos closely, then reverse-engineering what the finder believed the vulnerability to be, and then studying the videos again to find out where they went wrong.
I was feeling frustrated just reading the story.
The historical significance of the Burgermaster drive-in restaurant
https://devblogs.microsoft.com/oldnewthing/20200114-00/?p=103327 [devblogs.microsoft.com]
2020-01-16 03:36
tags:
food
malloc
windows
In Windows 3.0, the data segment that recorded the locations of all the other data segments was named the BurgerMaster.
The Burgermaster restaurant was so important that Bill Gates’s secretary kept it on speed dial. In fact, it wasn’t just on speed dial for Bill Gates’s secretary. It was a company-wide speed dial number. You could call them to order a burger, walk next door, and your order would be ready and waiting for you.
How can I have a C++ function that returns different types depending on what the caller wants?
https://devblogs.microsoft.com/oldnewthing/20191106-00/?p=103066 [devblogs.microsoft.com]
2019-11-07 03:12
tags:
cxx
programming
type-system
I tried to adjust the time on my alarm clock. I failed.
https://devblogs.microsoft.com/oldnewthing/20191104-01/?p=103052 [devblogs.microsoft.com]
2019-11-04 18:28
tags:
ioshit
life
tech
For some reason, my alarm clock requires that I install an app on my phone. And the app required me to create an account.
I’m going to repeat that: In order to set my alarm clock, I had to create an account with the clock manufacturer.
AddressSanitizer (ASan) for Windows with MSVC
https://devblogs.microsoft.com/cppblog/addresssanitizer-asan-for-windows-with-msvc/ [devblogs.microsoft.com]
2019-10-25 04:57
tags:
beta
c
compiler
cxx
development
update
windows
We are pleased to announce AddressSanitizer (ASan) support for the MSVC toolset. ASan is a fast memory error detector that can find runtime memory issues such as use-after-free and perform out of bounds checks. Support for sanitizers has been one of our more popular suggestions on Developer Community, and we can now say that we have an experience for ASan on Windows, in addition to our existing support for Linux projects.
MSVC support for ASan is available in our second Preview release of Visual Studio 2019 version 16.4.
source: white
Why can’t I create a “Please wait” dialog from a background thread to inform the user that the main UI thread is busy?
https://devblogs.microsoft.com/oldnewthing/20191023-00/?p=103020 [devblogs.microsoft.com]
2019-10-23 20:46
tags:
concurrency
programming
windows
When the dialog box sets the main UI window as its owner, this causes the input queues to become attached, at which point their fates become linked. In particular, the dialog box cannot show itself because doing so requires it to notify the owner window that the owner has lost activation, but that owner window is not responding to messages because it’s off doing the really long operation.
Specific instance of a more general problem. Doing the wrong thing with the wrong thread leads to sadness.
My summer vacation: London public transportation
https://devblogs.microsoft.com/oldnewthing/20191010-01/?p=102980 [devblogs.microsoft.com]
2019-10-11 03:08
tags:
transport
travel
urban
The two main forms of mass transit are the tube and buses. Passes are good for both systems, except where noted. There aren’t many options, which is good, because it makes decision-making easier. I’ll start by focusing on tickets for zones 1 and 2, which is where the major tourist attractions are. Prices are as of summer 2019.
How did MS-DOS decide that two seconds was the amount of time to keep the floppy disk cache valid?
https://devblogs.microsoft.com/oldnewthing/20190924-00/?p=102915 [devblogs.microsoft.com]
2019-09-25 02:12
tags:
fs
hardware
retro
storage
systems
windows
One byte used to cost a dollar
https://devblogs.microsoft.com/oldnewthing/20190827-00/?p=102809 [devblogs.microsoft.com]
2019-08-27 22:57
tags:
business
development
windows
Back in the days when software was distributed on floppy disks (remember floppy disks?), the rule of thumb for Windows was one byte costs a dollar.
In other words, considering the cost of materials, the additional manufacturing time, the contribution to product weight, the cost of replacing materials that became defective after they left the factory (e.g., during shipping), after taking data compression into account, and so on, the incremental cost of adding another megabyte to the Windows product was around one million dollars, or about a dollar per byte.
When it absolutely, positively has to be there for the product demo overnight
https://devblogs.microsoft.com/oldnewthing/20190726-00/?p=102735 [devblogs.microsoft.com]
2019-07-27 18:22
tags:
business
flying
windows
The person responsible for getting the fancy computer to Hawaii talked with the shipping company about the situation. At the time, they were Microsoft’s exclusive provider of overnight delivery services, and from how this story unfolds, it’s clear that they were serious about maintaining that status.