The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Image
Oct 7, 2026
Post comments count 1
Post likes count 0

How can undefined opcodes ud0 and ud1 have parameters? How undefined were they?

Image
Raymond Chen

They weren't defined, not even as undefined.

Image
Oct 6, 2026
Post comments count 2
Post likes count 2

Why does the compiler sometimes use ud2 and sometimes int 3 for code that shouldn’t execute?

Image
Raymond Chen

It shouldn't execute, but for different reasons.

Image
Oct 5, 2026
Post comments count 5
Post likes count 4

If somebody tries to hot-patch an already-hot-patched function, how do they avoid conflicts?

Image
Raymond Chen

Hot-patching is for Windows, not for you.

Image
Oct 2, 2026
Post comments count 0
Post likes count 2

Why is there no Windows hot-patching support for other architectures like 32-bit ARM and MIPS?

Image
Raymond Chen

They either predate hot-patching or never needed it.

Image
Oct 1, 2026
Post comments count 0
Post likes count 2

Windows on Itanium also provided for hot-patching, in an even simpler way

Image
Raymond Chen

Once again, the benefit of fixed-length instructions.

Image
Sep 30, 2026
Post comments count 4
Post likes count 2

Windows on AArch64 also provides for hot-patching, but it’s much simpler than on x86

Image
Raymond Chen

Fixed-length instructions makes it a much easier task.

Image
Sep 29, 2026
Post comments count 4
Post likes count 2

As a general rule, calling product support while drunk is not recommended

Image
Raymond Chen

Swearing is also poor form.

Image
Sep 28, 2026
Post comments count 5
Post likes count 3

C++ reminder: Function-local static variables are initialized only once, even if it looks like they get initialized multiple times

Image
Raymond Chen

Only on first execution.

Image
Sep 25, 2026
Post comments count 19
Post likes count 5

Debugging walkthrough: Access violation on nonsense instruction, episode 3

Image
Raymond Chen

Trying to figure out what the interloper was trying to.