This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18100] SIGFPE in wordexp/eval_expr_multdiv
- From: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 11 Mar 2015 07:20:38 +0000
- Subject: [Bug libc/18100] SIGFPE in wordexp/eval_expr_multdiv
- Auto-submitted: auto-generated
- References: <bug-18100-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18100
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos at redhat dot com
--- Comment #1 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Kostya Serebryany from comment #0)
> % gcc we13.c && ./a.out
> Floating point exception (core dumped)
It's a QoI issue balanced against performance.
e.g.
[carlos@athas glibc]$ echo $[1/0]
bash: 1/0: division by 0 (error token is "0")
Detecting this failure would likely require some rather complex processing
including running all commands in a child process to isolate the caller from
failures like this. The child would need handle signals gracefully, longjmp
out, and return an error code to the parent, which then also returns an error
code. This however would slow down wordexp, and this API gets used considerably
by mail servers and the like. Therefore I think it's likely the best we're
going to get is what we have today, which is that side-effects of the
evaluation of the expression are observed by the caller, including signals for
things like division by zero.
--
You are receiving this mail because:
You are on the CC list for the bug.