Critical issue regarding 64-bit EXEs [Solved]

by Gael Fraiteur on 20 Mar 2012

It’s not often that a bug fixes deserves a blog post, but today it happened :-(

64-bit programs (*.exe) processed by PostSharp are unable to allocate more than 2GB of memory because of a invalid flag in the NT Header (IMAGE_FILE_32BIT_MACHINE instead of IMAGE_FILE_LARGE_ADDRESS_AWARE). Yes, just one bit.

This issue is especially nasty because generally invisible during testing. It’s only in production that a process attempts to use more memory. The program would them have terminated with an OutOfMemoryException.

Big thanks to Augustunbear Zhang for diagnosing this issue.

The issue is fixed at revision

We recommend customers who have PostSharp-enhanced 64-bit programs (*.exe) in production to rebuild their project and redeploy them.

We sincerely apologize for the inconvenience this issue is causing. For any question or assistance, do not hesitate to contact me.

Happy PostSharping!