Floating point traps are triggered by alien code.
Bug #1519630 reported by
ender
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
Undecided
|
Unassigned |
Bug Description
When making foreign function calls (with sb-alien or a wrapper such as cffi), sbcl will trap floating point errors that happen in the C code, and by default sbcl traps on errors that aren't typically on in c code (the default mode in C99 is to be in nonstop mode, ie no fp exceptions trigger a SIGFPE).
This means that foreign function calls need to be wrapped in sb-int:
SBCL should probably make foreign function calls with the floating point environment set to the default.
To post a comment you must log in.
ender <email address hidden> writes:
> This means that foreign function calls need to be wrapped in sb-int traps-masked or clear traps with sb-ing: set-floating- point-
> :with-float-
> modes. Both of which are awkward and tricky to use portably.
>
> SBCL should probably make foreign function calls with the floating point
> environment set to the default.
+1 from user's point of view.