Environment is VC++ 9 on various Win platforms (XP and later)
I'm writing an unhandled exception handler. I have a vague recollection from my kernel days that it was bad to catch an EXCEPTION_GUARD_PAGE, as this was generated to tell the OS to enlarge the stack.
My question is twofold:
Can such an exception occur in user space?
If so, is it safe to catch it?
I'm not especially interested in doing anything with it. I just want to know if I need to put special code in to not catch it (as I'm catching everything at the moment).
_Update:_
I've recalled my source, it is Raymond Chen's blog (http://blogs.msdn.com/b/oldnewthing/archive/2006/09/27/773741.aspx)
My initial concern is that when catching all exceptions, if I catch a EXCEPTION_GUARD_PAGE, I might prevent the OS from seeing the exception and enlarging the stack.
On further thought, I suspect that the EXCEPTION_GUARD_PAGE might be handled in the Kernel during the read/write operation that generated it and thus will never reach my user-space code.
I guess I am looking for someone to confirm (or contradict) that.
_Second Update:_
I haven't selected an answer yet as nobody has really answered the question. I'll leave it open in the hope that somebody may yet offer the information that I seek.
_Third Update_
Still living in (faint) hope.
_Fourth Update_
Well, I never did get a usable answer. I've long finished the module I was writing when I asked the question. I think the question is, for practical purposes, dead. I probably won't update again.