I compiled a static library from the pixman 0.24.4 sources using MSVC 8.0 (2005 SP1). Initially I tried defining both USE_SSE2 and USE_X86_MMX. After linking with Cairo 1.10.2 and trying the simple example given in the Cairo FAQ, I found that the program crashed in cairo_show_text.
Tracing with ollydbg, the offending instruction was of the "MOVQ ..." variety. It caused an access violation as the source address was "FFFFFFFF". After finding that this could relate to either MMX or SSE2 operations I recompiled pixman without MMX, relinked against Cairo, but this had no effect. Then I tried compiling with MMX but without SSE2 - no more crashing, output as expected.
My CPU is an Intel Atom N270. It's slow, but it's not that far behind the times that it can't support SSE2. My gut feeling is that the compiler hasn't done something right, most likely as the source is geared more towards gcc.
Compiling a debug build results in the fault being identified within in_over_1x128.
Reading around, I found this bug over at Mozilla (https://bugzilla.mozilla.org/show_bug.cgi?id=640250) which describes my problem exactly, disassembly and all. The question is, can anything be done about MSVC failing to align the stack for 16 bytes?
It looks like Mozilla's solution was to always compile with optimization:
+ifneq (,$(filter 1400 1500, $(_MSC_VER)))
+# MSVC 2005 and 2008 generate code that breaks alignment
+# restrictions in debug mode so always optimize.
+# See bug 640250 for more info.
It was and it does. :)