1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 07:28:09 +02:00
Files
archived-php-src/ext/standard
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
..
2020-10-30 11:13:35 +01:00
2020-07-06 21:13:34 +02:00
2020-10-05 10:48:04 +02:00
2020-10-26 11:06:10 +01:00
2020-06-17 13:04:01 +00:00
2020-04-14 15:16:26 +00:00
2020-07-06 21:13:34 +02:00
2021-02-11 16:49:39 +01:00
2020-06-08 10:38:45 +02:00
2020-05-14 13:35:12 +02:00
2020-09-08 15:23:23 +02:00
2020-06-08 10:38:45 +02:00
2021-02-01 13:00:22 +01:00
2020-09-04 14:29:31 +02:00
2021-08-17 11:31:14 +02:00
2020-07-06 21:13:34 +02:00
2020-09-22 11:23:01 +02:00
2020-06-08 10:38:45 +02:00
2020-09-22 11:30:02 +02:00
2021-07-16 10:07:26 +02:00
2021-05-19 14:09:21 +02:00
2020-11-24 13:10:35 +01:00
2020-07-06 21:13:34 +02:00
2020-09-22 23:05:12 +01:00
2020-07-06 21:13:34 +02:00
2020-06-30 14:30:33 +02:00
2020-07-06 21:13:34 +02:00
2020-07-06 21:13:34 +02:00
2021-06-11 09:33:55 +02:00
2020-09-22 23:31:56 +02:00
2020-06-25 10:49:34 +02:00
2020-09-22 11:30:02 +02:00
2020-06-08 10:38:45 +02:00
2020-08-07 12:35:30 +02:00
2020-06-08 10:38:45 +02:00
2020-05-14 10:25:52 +02:00
2020-07-06 21:13:34 +02:00
2021-01-12 10:42:09 +01:00
2020-08-26 12:59:43 +02:00
2020-07-06 21:13:34 +02:00
2020-06-30 14:30:33 +02:00
2021-07-15 12:56:12 +02:00
2020-07-06 21:13:34 +02:00
2020-07-06 21:13:34 +02:00
2020-07-06 21:13:34 +02:00
2020-07-06 21:13:34 +02:00
2021-01-27 00:18:49 -08:00
2020-11-04 14:57:17 +01:00
2020-09-22 12:39:39 +02:00
2021-06-18 11:17:03 +02:00