title: Is it safe to catch EXCEPTION_GUARD_PAGE
body: <p>Environment is VC++ 9 on various Win platforms (XP and later)</p>
  <p>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.</p>
  <p>My question is twofold:</p>
  <ol>
  <li><p>Can such an exception occur in user space?</p>
  </li>
  <li><p>If so, is it safe to catch it?</p>
  </li>
  </ol>
  <p>I'm not especially interested in doing anything with it.  I just want to know if I need to put special code in to <em>not</em> catch it (as I'm catching everything at the moment).</p>
  <p><strong><strong>Update:</strong></strong></p>
  <p>I've recalled my source, it is Raymond Chen's blog (<a href="https://devblogs.microsoft.com/oldnewthing/20060927-07/?p=29563" rel="nofollow noreferrer">http://blogs.msdn.com/b/oldnewthing/archive/2006/09/27/773741.aspx</a>)</p>
  <p>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.</p>
  <p>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.</p>
  <p>I guess I am looking for someone to confirm (or contradict) that.</p>
  <p><strong><strong>Second Update:</strong></strong></p>
  <p>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.</p>
  <p><strong><strong>Third Update</strong></strong></p>
  <p>Still living in (faint) hope.</p>
  <p><strong><strong>Fourth Update</strong></strong></p>
  <p>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.</p>