-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Floating Point Exception #570
Comments
Not seeing that happen here, and in fact we just recently did a test install of Wordpress and it worked right out of the box. (Blog post on this coming, in fact) Can you provide further context? |
I'm using Debian testing. Gcc 4.6.3 since 4.7 doesn't work. Cmake version 2.8.9-rc1. Not sure what else would be helpful. Here's a backtrace from gdb running the compiled program: Not terribly helpful to me. Is there some debugging switches I could use to enable debug symbols with hphp? |
d3xt3r01 www # cat t.php |
Seems to be similiar to #552 |
Ok, great, now we only need to get a fix :| |
I have the same problem here, compiling works without errors, but on execution I get an floating-point exception. Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Program received signal SIGFPE, Arithmetic exception. System is: Linux probook 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux A fix for this would be great! |
Getting same error on a big-ish project that works fine in the pre-HHVM version of HPHP, HHVM works fine but trying to use the new HPHP just won't work. Output of compilation: And here is what happens when I try to do anything with the compiled program; And here's the output of GDB: Program received signal SIGFPE, Arithmetic exception. |
Having the same issuing trying to setcookie() with time() + 2678400. Even tried just setcookie("name", "value", 1378564901) without any math and still crashes with the same error. Program received signal SIGFPE, Arithmetic exception. (gdb) break HPHP::String::PreConvertInteger (gdb) run Breakpoint 1, HPHP::String::PreConvertInteger (n=2678400) at /usr/src/facebook/hiphop-php/src/runtime/base/type_string.cpp:68 (gdb) list (gdb) print integer_string_data_map |
The Problem looks to be in integer_string_data_map.find() function when calling std::size_t __n = this->_M_bucket_index(__k, __code, _M_bucket_count); _M_bucket_count is 0 and the next function in the stack is trying to return a modulo return __num % __den; As a work around until this bug is fixed you can incase the integer in your code inside '' Should compile and run just fine without SIGFPE |
This is a case of static initialization order problem. The static variable
of the generated sys/cpputil.cpp gets initialized before String::integer_string_data_map. type_string.h:
type_string.cpp:
|
I'm having the same problem with my build. It compiles fine but throws the exception when I run the program as a server. I tried the fix above by @neilnacario but the same thing happened. Do I need to remake Hiphop for it to take effect? EDIT: After posting I realise it was a stupid question, rebuilding it now. EDIT AGAIN: It works after the post above, thanks @neilnacario |
We're closing out all bugs older than 2 months. http://www.hiphop-php.com/wp/?p=575 If this is still an issue, please re-open it, and in order of goodness:
|
Working with number larger than 65,535 is failing with a floating point exception with hphp.
This simple program compiles fine but does not run:
The text was updated successfully, but these errors were encountered: