From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3676 invoked by alias); 8 May 2011 07:03:56 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29186 Received: (qmail 12839 invoked from network); 8 May 2011 07:03:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 74.125.83.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=DQTvzCUFBTBXCKJN2kEEESZo+QnvwwTaBPmTY1e0tmM=; b=rFA2N9fG2XGHn5FWXX3RaBEwFbInPZ6gSy5NmVLWWWrAQ+5f0ReG82wHFr1jKCRrOR z8lq8pzDNgWCuJvOjlnKR8EtaOBBlMdsJmlGOgPuFmUPTP63ZNKsSg1lTIrTuj16Ocdp /VN68ceMG3t/zY+sgVh3ng+HfQV/5499fNnQ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=NQXEDYwIarMBiPtijm1zbO21gwoQoczuBsHfmkjibJrfuvAnQYF3Hz+KVXflGl4PPB uY8FvZYCFs/eFKKZA56HPoxITFoaY5qciy5CRXF2HpUatJwVql8oj1xwSm3OvKb1un7X oR3j1RE00XFEUeId15a0r7nwrWiXBIHGFzads= MIME-Version: 1.0 In-Reply-To: <110507194654.ZM16644@torch.brasslantern.com> References: <110507194654.ZM16644@torch.brasslantern.com> Date: Sun, 8 May 2011 00:03:48 -0700 Message-ID: Subject: Re: SIGFPE crash From: Jon Mayo To: Bart Schaefer , zsh workers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, May 7, 2011 at 7:46 PM, Bart Schaefer w= rote: > On May 7, =C2=A02:56pm, Jon Mayo wrote: > } > } echo $[-9223372036854775808/-1] > } > } this causes zsh to exit immediately with an FPE. Does anyone have a > } patch to fix this? > > Interesting. > > schaefer<505> echo $[-9223372036854775808/-1] > -9223372036854775808 > schaefer<506> echo $[-9223372036854775809/-1] > zsh: number truncated after 18 digits: 9223372036854775809/-1 > 922337203685477580 > > No FPE in either case. > > On May 7, =C2=A05:05pm, Jon Mayo wrote: > } > } perhaps scripts that care can just use a trap? and all my worrying was > } for nothing? > > I'm having a hard time testing this because I can't get a mathematically > induced FPE, but recall that (quoting the doc): > > =C2=A0 * The return status from function traps is special, whereas a retu= rn > =C2=A0 =C2=A0 from a list trap causes the surrounding context to return w= ith the > =C2=A0 =C2=A0 given status. > > So if you use > > =C2=A0 =C2=A0trap 'return 1' FPE > > you might avoid the infinite retry of the operation that Mikael reported. > > -- > nope, it spins with 100% cpu even on that one. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2790 jon 20 0 40740 3292 1896 R 100 0.0 0:17.17 zsh - Jon