2020-02-20 08:45 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004910Spring engineGeneralpublic2015-07-22 16:32
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Product Version100.0+git 
Target VersionFixed in Version 
Summary0004910: check if SIGNAL_NANS can be replaced by feenableexcept()
Descriptionif not, it could be made runtime changeable / always enabled and SIGNAL_NANS removed.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files




abma (administrator)

maybe as alternative if feenableexcept() / _control87() leads to the same result:


abma (administrator)

Last edited: 2015-07-20 15:31

View 2 revisions

with this (--std=c++11)

// g++ -fno-signaling-nans -std=c++11 test.cpp -o signal-nans
#include <stdio.h>
#include <cfenv>

int main()
        printf("%f\n", 1.0f / 0.0f);
        return 0;

i get Floating point exception (core dumped), soo...?!


jK (developer)

The engine uses that already.
Just for lua it's disabled, cause: any usage of math.huge would trigger a SIGFPE.
Crashing on such is not an option, so the engine only handles NANs when they leave lua & enter engine code.


abma (administrator)

code reference:


so, more specific: anything against making #if defined(__SUPPORT_SNAN__) a config setting?


jK (developer)

Last edited: 2015-07-22 16:32

View 2 revisions

only when SIGNAL_NANS is enabled, else it would raise in lua too and cause a lot crashes.


-Issue History
Date Modified Username Field Change
2015-07-20 15:22 abma New Issue
2015-07-20 15:22 abma Description Updated View Revisions
2015-07-20 15:26 abma Note Added: 0015020
2015-07-20 15:28 abma Note Added: 0015021
2015-07-20 15:31 abma Note Edited: 0015021 View Revisions
2015-07-20 15:32 abma Summary check if SIGNAL_NANS is slower than regular build => check if SIGNAL_NANS can be replaced by feenableexcept()
2015-07-22 03:53 jK Note Added: 0015026
2015-07-22 11:55 abma Note Added: 0015028
2015-07-22 16:32 jK Note Added: 0015029
2015-07-22 16:32 jK Note Edited: 0015029 View Revisions
+Issue History