Slide 17
Slide 17 text
# apt-get update
# apt-get install -y gdb
# gdb --args ./sapi/cli/php -r 'var_dump(range(9.9, "0"));'
(gdb) run
Starting program: /usr/src/php/sapi/cli/php -r var_dump\(range\(9.9,\ \"0\"\)\)\;
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
zif_range (execute_data=0xfffff7a130f0, return_value=0xfffff7a13070)
at /usr/src/php/ext/standard/array.c:2963
2963 unsigned char low = (unsigned char)Z_STRVAL_P(user_start)[0];
gdb を入れてスタックトレースを取る
原因の行まで
特定できた!