Question

I am working on a project which is using 1 byte alignment by default, including in places that use the CRITICAL_SECTION struct. I am investigating a certain deadlock and I can see that the data in the CRITICAL_SECTION struct which is causing the trouble is invalid .. can the alignment be the trouble ? (I can also see that for this specific CRITICAL_SECTION indeed the alignment is 1 (odd address) ..)

Thanks, Amit

Was it helpful?

Solution

Windows header files require /Zp8 packing. You must respect the packing specified by the header file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top