1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 19:41:05 +02:00
Files
archived-php-src/ext
Hao Sun 6f6fd27d2f ARM64: range.phpt failed under RELEASE mode
Test case "ext/standard/tests/array/range.phpt" failed on ARM64 machine
only under RELEASE mode.

How to reproduce it:
```
./buildconf -f; ./configure; make -j 128
make test TESTS="-d opcache.enable=1 -d opcache.enable_cli=1 ext/standard/tests/array/range.phpt"
```

Root cause:
I suspect the root cause is that on ARM64 machine, PHP RELEASE mode
produces different values for internal function range() compared to
DEBUG mode.

Take the downsized test case downsize-range.php [1] as an example. We
applied the check-element.diff patch to check the original values. Note
that we print out the floating point numbers with precision 16.

From the outputs in file output.md, we can see the 7-th and 9-th
elements are different between RELEASE and DEBUG.

To be honest, I didn't get where such difference comes from and probably
this is due to different compilation options used by RELEASED and DEBUG.

Fix:
After commit [2], serialize_precision is used for var_dump(). As a
result, the pre-set "precision=14" didn't work actually.

In this patch, we turn to set serialize_precision as 14 and therefore
the difference between RELEASE and DEBUG can be eliminated.

Note-1: this failue didn't occur on x86 machine.
Note-2: in my local test, this is the only test case which behaves
differently on ARM64 machine under RELEASE and DEBUG mode.

[1] https://gist.github.com/shqking/0d55abf8dbaafde4a00ea9304e71f06b
[2] https://github.com/php/php-src/commit/a939805

Change-Id: I9293e990925590f8d7cfb2462d8d760abf76069f
2021-09-29 09:07:17 +00:00
..
2021-06-08 15:38:57 +02:00
2020-10-07 14:58:43 +02:00
2021-08-31 17:24:30 +02:00
2021-05-28 23:24:55 +02:00
2021-09-13 12:13:09 +02:00
2020-10-02 11:56:16 +02:00
2021-09-15 15:00:49 +03:00
2021-09-23 23:18:52 +02:00
2021-06-10 14:47:36 +02:00
2020-10-07 12:26:46 +02:00
2020-10-09 15:25:23 +02:00
2021-08-17 12:27:32 +02:00
2021-07-20 00:28:27 +02:00
2021-03-16 09:31:46 +01:00
2021-06-02 12:21:45 +02:00
2021-04-27 22:23:06 +02:00
2021-09-28 23:49:26 +03:00
2021-04-12 12:15:07 +02:00
2021-09-13 14:35:49 +02:00
2020-12-24 17:48:39 +11:00
2021-04-26 19:37:41 +02:00
2021-04-11 10:38:07 +02:00
2021-06-03 10:33:10 +02:00
2021-07-01 13:36:57 +02:00
2021-05-28 09:45:06 +02:00
2021-09-02 23:18:53 +02:00
2021-08-03 12:10:20 +02:00
2021-03-29 14:19:39 +02:00
2021-09-28 15:52:58 +02:00
2020-12-02 10:19:32 +01:00
2021-09-16 12:06:36 +02:00
2020-10-08 10:28:50 +02:00
2021-09-13 22:46:26 +02:00
2021-09-20 21:35:43 -07:00
2021-04-26 12:12:04 +02:00