Bug #73954 [Asn]: NAN check fails on Alpine Linux with musl
| From: | cmb@php.net | Date: | Thu, 19 Jan 2017 10:16:42 +0000 |
| Subject: | Bug #73954 [Asn]: NAN check fails on Alpine Linux with musl | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206741@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73954&edit=1
ID: 73954
Updated by: cmb@php.net
Reported by: zaq178miami at gmail dot com
Summary: NAN check fails on Alpine Linux with musl
Status: Assigned
Type: Bug
Package: *General Issues
Operating System: Alpine Linux
PHP Version: Irrelevant
Assigned To: ajf
Block user comment: N
Private report: N
New Comment:
Thanks for the explanation, Andrea. So this is solely a musl
issue.
Previous Comments:
------------------------------------------------------------------------
[2017-01-19 00:22:29] ajf@php.net
> See <https://3v4l.org/PHBQK>. Why does Z_PARAM_LONG
> accept NAN,
> but a userland
int type declaration does not?
chr() uses ZEND_PARSE_PARAMS_QUIET to suppress errors in parameter parsing, so it does not display
the normal behaviour. It ignoring NAN is expected. Additionally, chr() usually doesn't actually
get called, because it is a special-cased function which zend_compile.c replaces with an opcode.
------------------------------------------------------------------------
[2017-01-18 23:00:21] cmb@php.net
> I can look into it, but it works for me.
See <https://3v4l.org/PHBQK>. Why does Z_PARAM_LONG
accept NAN,
but a userland int type declaration does not?
The different behavior with musl[1] would have been to be resolved
also, but I have some doubts that the test script in the OP should
really have the reported expected result, especially when
considering
> [â¦], but typehints for userland and internal functions inherit
> their handling of NaN for integer parameters from ZPP (and
> actually share the code for this with ZPP internally), [â¦]
[1] <https://www.musl-libc.org/>
------------------------------------------------------------------------
[2017-01-18 00:45:32] alex dot masterow at gmail dot com
> So, what particular OS, compiler and version are you dealing with?
Alpine Linux (alpine:3.5/edge on Docker hub)
$ uname -a
Linux version 3.16.0-4-amd64
musl 1.1.16-r2
gcc 6.3.0-r1
php 7.0.14/15
------------------------------------------------------------------------
[2017-01-17 23:06:00] ajf@php.net
I can look into it, but it works for me. So, what particular OS, compiler and version are you
dealing with?
------------------------------------------------------------------------
[2017-01-17 23:01:54] cmb@php.net
It seems to me that the NaN handling is broken (not only with
musl). Andrea, could you please take a closer look at this?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=73954
--
Edit this bug report at https://bugs.php.net/bug.php?id=73954&edit=1