Quantcast
Channel: The Old New Thing
Browsing all 3085 articles
Browse latest View live
โ†ง

Image may be NSFW.
Clik here to view.

Please enjoy the new eco-friendly printers, now arguably less eco-friendly

Some years ago, the IT department replaced the printers multifunction devices with new reportedly eco-friendly models. One feature of the new devices is that when you send a job to the printer, it...

View Article


Image may be NSFW.
Clik here to view.

When you think you found a problem with a function, make sure you're actually...

A customer reported that the DuplicateยญHandle function was failing with ERROR_INVALID_HANDLE even though the handle being passed to it seemed legitimate: // Create the handle here m_Event =...

View Article


Image may be NSFW.
Clik here to view.

Corrupted file causes application to crash; is that a security vulnerability?

A security vulnerability report came in that went something like this: We have found a vulnerability in the XYZ application when it opens the attached corrupted file. The error message says,...

View Article

Image may be NSFW.
Clik here to view.

The curse of the redefinition of the symbol HLOG

A customer was running into a compiler error complaining about redefinition of the symbol HLOG. #include <pdh.h> #include <lm.h> ... The result is lmerrlog.h(80): error C2373: 'HLOG'...

View Article

Image may be NSFW.
Clik here to view.

The Itanium processor, part 1: Warming up

The Itanium may not have been much of a commercial success, but it is interesting as a processor architecture because it is different from anything else commonly seen today. It's like learning a...

View Article


Image may be NSFW.
Clik here to view.

The Itanium processor, part 2: Instruction encoding, templates, and stops

Instructions on Itanium are grouped into chunks of three, known as bundles, and each of the three positions in a bundle is known as a slot. A bundle is 128 bits long (16 bytes) and always resides on a...

View Article

Image may be NSFW.
Clik here to view.

The Itanium processor, part 3: The Windows calling convention, how parameters...

The calling convention on Itanium uses a variable-sized register window. The mechanism by which this is done is rather complicated, so I'm first going to present a conceptual version, and then I'll...

View Article

Image may be NSFW.
Clik here to view.

The Itanium processor, part 4: The Windows calling convention, leaf functions

Last time, we looked at the general rules for parameter passing on the Itanium. But those rules are relaxed for leaf functions (functions which call no other functions). Before we start, I need to...

View Article


Image may be NSFW.
Clik here to view.

The Itanium processor, part 3b: How does spilling actually work?

Answering some interesting questions that arose yesterday. I didn't know the answers either, so I went and read the manual, specifically Volume 2 (IA-64 System Architecture), chapter 6 (IA-64 Register...

View Article


Image may be NSFW.
Clik here to view.

The Itanium processor, part 5: The GP register, calling functions, and...

We saw a brief mention of the gp register last time, where we saw it used when we calculated the address of a global variable. The only addressing mode supported by the Itanium processor is register...

View Article

Image may be NSFW.
Clik here to view.

The Itanium processor, part 6: Calculating conditionals

The Itanium does not have a flags register. A flags register creates implicit dependencies between instructions, which runs contrary to the highly parallel model the Itanium was designed for. Instead...

View Article

Image may be NSFW.
Clik here to view.

The Itanium processor, part 7: Speculative loads

Today we'll look at speculative loads, which is when you load a value before you even know whether the value should be loaded. (A related but distinct concept is advanced loading, which we'll look at...

View Article

Image may be NSFW.
Clik here to view.

The Itanium processor, part 8: Advanced loads

Today we'll look at advanced loads, which is when you load a value before you're supposed to, in the hope that the value won't change in the meantime. Consider the following code: int32_t...

View Article


Image may be NSFW.
Clik here to view.

The Itanium processor, part 9: Counted loops and loop pipelining

There is a dedicated register named ar.lc for counted loops. The br.cloop instruction acts like this: if (ar.lc != 0) { ar.lc = ar.lc - 1; goto branch; } Consider this loop to increment every 32-bit...

View Article

Image may be NSFW.
Clik here to view.

The Itanium processor, part 10: Register rotation

Last time, we looked at counted loops and then improved a simple loop by explicitly pipelining the loop iterations. This time, we're going to take the pipelining to the next level. Let's reorder the...

View Article


Image may be NSFW.
Clik here to view.

What if I have two programs that are logically a single application, and I...

Suppose you have two programs that are logically one application, and you want them to be treated as a single group on the taskbar, share jump lists, and all that stuff. Basically, even though they...

View Article

Image may be NSFW.
Clik here to view.

The changing fortunes of being the last program on the Start menu

One of the thing I didn't mention during my discussion lo many years ago on how Windows XP chooses what goes on the front page of the Start menu is that the the last-place position is actually kind of...

View Article


Image may be NSFW.
Clik here to view.

The ARM processor architecture: Somebody else's introduction

While you wait for me to write the Alpha AXP processor architecture overview,ยน I'd like to direct your attention to the ARM processor architecture overview written up by Marion Cole over at the NT...

View Article

Image may be NSFW.
Clik here to view.

Why does the taskbar icon for grouped windows change to something weird?

This question came in from two customers. I'm pretty sure it was two customers rather than one customer going on a fishing expedition because the questions came six months apart, and the scenarios...

View Article

Image may be NSFW.
Clik here to view.

Crashes in the I/O stack tend to occur in programs which do the most I/O

A customer was diagnosing repeated blue screen errors on their system. They shared a few crash dumps, and they all had a similar profile: The crash occurred in the file system filter stack as the I/O...

View Article
Browsing all 3085 articles
Browse latest View live