<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 22, 2014 at 6:22 PM, David Krauss <span dir="ltr"><<a href="mailto:david_work@me.com" target="_blank">david_work@me.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Migrating this from the std-discussion list; it’s more appropriate here.<br><br>On Thursday, January 23, 2014 9:15:41 AM UTC+8, Richard Smith wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_quote">On Tue, Jan 7, 2014 at 1:39 AM, David Krauss <span dir="ltr"><<a>pot...@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There are no requirements about what happens when these resource limits are exceeded.<br></blockquote><div><br></div><div>
This
is the intent, and is deliberate. If you run your compiler out of
memory or stack space, or otherwise exceed its limits in a way which it
might not be able to defend against, it is not required to produce a
diagnostic.</div></div></div></blockquote><div><br>If a program is
abnormally terminated, most environments emit a message which
counts toward the diagnostic requirement. An OS/shell which doesn't, or which
allows the stack to overflow into the heap, is unsuitable for
development work.<br><br>Running out of heap space may be diagnosed by the usual means: std::bad_alloc, check for null pointer results.</div></div></blockquote><div><br></div><div>There's no guarantee that running out of heap space will give you an std::bad_alloc. Implementations make an effort to do that, but there are many reasons why they might not succeed. (Maybe the exception-handling subsystem itself requires dynamic memory allocation and whatever emergency reserve the system keeps on hand has been exhausted; maybe instead of a hard failure from address space exhaustion, the entire machine will page itself into uselessness.)</div>
</div></div></div>