Compiling forms containing literal NaNs causes FLOATING-POINT-INVALID-OPERATION on high debug/safety
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| SBCL |
Undecided
|
Unassigned |
Bug Description
SBCL 2.1.0 on Linux amd64.
* (describe-
Basic qualities:
COMPILATION-SPEED = 1
DEBUG = 3
SAFETY = 3
SPACE = 1
SPEED = 1
INHIBIT-WARNINGS = 1
Dependent qualities:
SB-C::CHECK-
SB-C::TYPE-CHECK = 1 -> 3 (full)
SB-C::CHECK-
SB-C::LET-
SB-C:ALIEN-
SB-C:VERIFY-
SB-C::INSERT-
SB-C::RECOGNIZE
SB-C::FLOAT-
SB-C:INSERT-
SB-C::COMPUTE-
SB-C:STORE-
SB-C::PRESERVE-
SB-C::INSERT-
SB-C::STORE-
SB-C:STORE-
SB-C::INSTRUMEN
SB-C::STORE-
SB-KERNEL:
* (compile nil (lambda () (cl:define-
debugger invoked on a FLOATING-
#<THREAD "main thread" RUNNING {1004A684B3}>:
arithmetic error FLOATING-
Operation was (> #<SINGLE-FLOAT quiet NaN> #<SINGLE-FLOAT quiet NaN>).
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(SB-KERNEL:
Michał "phoe" Herda (phoe-krk) wrote : | #1 |
Michał "phoe" Herda (phoe-krk) wrote : | #2 |
This fails also on default optimization settings and also on SBCL 2.0.10.
Minimum reproducible error: (compile nil (lambda () #.(sb-kernel:
Changed in sbcl: | |
status: | New → Fix Committed |
summary: |
- DEFINE-SYMBOL-MACRO with literal NaN causes FLOATING-POINT-INVALID- + Compiling forms containing literal NaNs causes FLOATING-POINT-INVALID- OPERATION on high debug/safety |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
Issue moved over from https:/ /github. com/brown/ protobuf/ issues/ 21
Seems like SBCL on high safety/debug is trying to make a numeric type out of two NaNs and calls #'> on them, which causes a FPU trap and signals an error.