Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Java puzzler Date: Thu, 12 May 2011 22:34:12 -0400 Organization: A noiseless patient Spider Lines: 19 Message-ID: References: <4db69c13-878f-4806-adb2-a3c5adb1c48c@glegroupsg2000goo.googlegroups.com> <-8mdnSRPEIdA21HQnZ2dnUVZ_j2dnZ2d@earthlink.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 13 May 2011 02:34:16 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="BrOwaJANne849xlH+KPYjQ"; logging-data="24941"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dqWAB+7BGKtSIbCaqn48q" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: Cancel-Lock: sha1:3/Hah0lHN1wE+C2DdkVw8JG37PQ= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4038 On 5/12/2011 9:01 PM, markspace wrote: > On 5/12/2011 5:47 PM, Nancy 3 wrote: > >> I'm sorry. I assumed you wanted an ArithmeticException or some other >> Java exception on overflow, rather than an application fault ala SIGSEGV >> that brings down the whole JVM. :) > > SIGSEGV can be trapped and redirected to the JVM to handle. It's a > hardware thing, not limited by any given implementation, *nix or otherwise. In point of fact, SIGSEGV itself is not hardware-generated by any machine I know of. You get a hardware detected "page fault" or "MMU exception" or similar, and then the operating system rummages about for a while to choose between (1) fetch a page from disk, (2) allocate some more memory for the stack, (3) generate SIGSEGV, (4) ... -- Eric Sosman esosman@ieee-dot-org.invalid