-
-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Description
With safeclib 3.8.1 I've got an exception with a code that worked before with 3.3.0
#include <fenv.h>
#include <cfenv>
#include <xmmintrin.h>
#include <safe_str_lib.h>
int main(void)
{
const int MAXLINELENGTH1 = 200;
static char s[MAXLINELENGTH1];
sprintf_s(s, MAXLINELENGTH1, " %e", 0.0); // <-- Here is fine
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
sprintf_s(s, MAXLINELENGTH1, " %e", 0.0); // <-- Exception is here
}
I use RedHat 8 with GCC 11.
Exception occurs here
safeclib/src/str/vsnprintf_s.c
Line 600 in 97c8b06
value /= conv.F; |
Looks like a bug