-
-
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
php 7.1.3 gettype(-1) returns "double" instead of "integer" when built with clang #890
Comments
For me, it returns |
It works as expected on my arm device. Which arch are you using? |
uname -a: |
CPU: Qualcomm Snapdragon 430 MSM8937 |
Same for me: $ uname -a |
Hm, so it seems to be a problem at least for 64-bit arm, and working on 32-bit arm. |
That's really annoying. It means that functions like |
I tried running Ubuntu on aarch64 (using proot on termux) with version 7.0.15 and it works as expected returning |
compiling with gcc fixes this on arm64 |
I tried building it with gcc, and it does indeed fix the problem. |
The tricky bit now is getting a test case or something so the ndk guys can fix it. |
Wow, building with clang causes this? Interesting! |
The We still need to find the reason why the problem occurs when built with clang as gcc is planned to be removed from the NDK, but we can build with gcc for now to have a working package, and await further updated PHP and NDK versions to see if they fix the problem. |
Just tried again with PHP v7.1.6 and clang from NDK r15 - still same problem. |
Time to post issue on ndk ? |
This turned out to be a bug in php (inline aarch64 assembly) fixed in php/php-src@8c86792. This fix has been backported to the newly released 7.1.7 version of the php package, which is now built with clang. |
Register operands are required in this context.
Android package php 7.1.3. Command
php -r "echo gettype(-1);"
returns ''double", should be "integer". This breaks programs that rely on correct type value. I've checked php7.1.3 amd64 package on ubuntu and return value is "integer" as expected.The text was updated successfully, but these errors were encountered: