View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0004910 | Spring engine | General | public | 2015-07-20 15:22 | 2015-07-22 16:32 | ||||||||
Reporter | abma | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||||
Status | new | Resolution | open | ||||||||||
Product Version | 100.0+git | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0004910: check if SIGNAL_NANS can be replaced by feenableexcept() | ||||||||||||
Description | if not, it could be made runtime changeable / always enabled and SIGNAL_NANS removed. | ||||||||||||
Tags | No tags attached. | ||||||||||||
Checked infolog.txt for Errors | |||||||||||||
Attached Files |
|
Notes | |
abma (administrator) 2015-07-20 15:26 |
maybe as alternative if feenableexcept() / _control87() leads to the same result: http://en.cppreference.com/w/cpp/numeric/fenv |
abma (administrator) 2015-07-20 15:28 Last edited: 2015-07-20 15:31 |
with this (--std=c++11) // g++ -fno-signaling-nans -std=c++11 test.cpp -o signal-nans #include <stdio.h> #include <cfenv> int main() { feenableexcept(FE_ALL_EXCEPT); std::feraiseexcept(FE_ALL_EXCEPT); printf("%f\n", 1.0f / 0.0f); return 0; } i get Floating point exception (core dumped), soo...?! |
jK (developer) 2015-07-22 03:53 |
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) 2015-07-22 11:55 |
code reference: https://github.com/spring/spring/blob/036b798fefe0e4a3bc82be8ecb8aa8806a6a9263/rts/System/Sync/FPUCheck.cpp#L108 so, more specific: anything against making #if defined(__SUPPORT_SNAN__) a config setting? |
jK (developer) 2015-07-22 16:32 Last edited: 2015-07-22 16:32 |
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 |