[Webkit-unassigned] [Bug 42448] crash in JSC::UString::toUInt32(bool * ok, bool tolerateEmptyString=true)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 23 07:47:22 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=42448
--- Comment #4 from stawel at gmail.com 2010-07-23 07:47:21 PST ---
I made some research,
here is an example (for linux, and windows)
I guess that some other library turns on the
fp exceptions.
///example.cpp
#include <iostream>
#include <limits>
#include <fpu_control.h>
using namespace std;
int main(int argc, char* argv[])
{
// on winodws
// _control87 (0, _EM_INVALID);
// on linux gcc 4.2.4
fpu_control_t fpu_cw;
fpu_cw = _FPU_DEFAULT & (~_FPU_MASK_IM);
_FPU_SETCW(fpu_cw);
double d;
// each of them work
d = numeric_limits<double>::infinity();
d = numeric_limits<double>::quiet_NaN();
d = numeric_limits<double>::signaling_NaN();
if(d != static_cast<uint32_t>(d)) { // exception
cout << "error\n" ;
} else {
cout << "ok\n";
}
return 0;
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list