Hi,
Something else: there are two FORCEINLINE functions in
ntoskrnl/include/internal/ntoskrnl.h, DefaultSetInfoBufferCheck() and
DefaultQueryInfoBufferCheck(), but they cannot be inlined because of SEH
(i.e. setjmp/longjmp).
Timo Kreuzer wrote:
What about wrapping the _SEH_TRY part in a local
inline function? In my
tests this successfully prevented the variables from being optimized away.
At least under normal optimisation settings.