You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/w023dtc/nightly_php/php-src/ext/bcmath/libbcmath/src/rmzero.c:50:11: runtime error: member access within null pointer of type 'struct bc_struct'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/w023dtc/nightly_php/php-src/ext/bcmath/libbcmath/src/rmzero.c:50:11
Warning: Undefined variable $value1 in /home/niels/php-src/x.php on line 27
Warning: Undefined variable $value2 in /home/niels/php-src/x.php on line 29
Deprecated: BcMath\Number::__construct(): Passing null to parameter #1 ($num) of type string|int is deprecated in /home/niels/php-src/x.php on line 30
Deprecated: BcMath\Number::__construct(): Passing null to parameter #1 ($num) of type string|int is deprecated in /home/niels/php-src/x.php on line 33
/home/niels/php-src/ext/bcmath/libbcmath/src/rmzero.c:50:9: runtime error: member access within null pointer of type 'struct bc_struct'
#0 0x5589e272343b in bc_rm_trailing_zeros /home/niels/php-src/ext/bcmath/libbcmath/src/rmzero.c:50
#1 0x5589e2703686 in bcmath_number_pow_internal /home/niels/php-src/ext/bcmath/bcmath.c:1179
#2 0x5589e27049e3 in bcmath_number_do_operation /home/niels/php-src/ext/bcmath/bcmath.c:1310
#3 0x5589e48387b2 in pow_function /home/niels/php-src/Zend/zend_operators.c:1423
#4 0x5589e3aa1954 in zif_pow /home/niels/php-src/ext/standard/math.c:604
#5 0x5589e432997b in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER /home/niels/php-src/Zend/zend_vm_execute.h:1421
#6 0x5589e460918f in execute_ex /home/niels/php-src/Zend/zend_vm_execute.h:115951
#7 0x5589e46282c7 in zend_execute /home/niels/php-src/Zend/zend_vm_execute.h:121434
#8 0x5589e48bf916 in zend_execute_script /home/niels/php-src/Zend/zend.c:1977
#9 0x5589e3d77c8d in php_execute_script_ex /home/niels/php-src/main/main.c:2640
#10 0x5589e3d78220 in php_execute_script /home/niels/php-src/main/main.c:2680
#11 0x5589e48c88bb in do_cli /home/niels/php-src/sapi/cli/php_cli.c:951
#12 0x5589e48cc5cb in main /home/niels/php-src/sapi/cli/php_cli.c:1362
#13 0x7f0a0d827674 (/usr/lib/libc.so.6+0x27674) (BuildId: 4fe011c94a88e8aeb6f2201b9eb369f42b4a1e9e)
#14 0x7f0a0d827728 in __libc_start_main (/usr/lib/libc.so.6+0x27728) (BuildId: 4fe011c94a88e8aeb6f2201b9eb369f42b4a1e9e)
#15 0x5589e22044b4 in _start (/home/niels/php-src/sapi/cli/php+0x38044b4) (BuildId: 53e9c40c58cd6b5ff6deccddd9f2e9339c68b803)
Activity
[-]undefined behavior in bcmatch[/-][+]undefined behavior in bcmath[/+]chongwick commentedon Sep 30, 2025
#16236?
ndossche commentedon Sep 30, 2025
ndossche commentedon Sep 30, 2025
Reduced to:
[-]undefined behavior in bcmath[/-][+]Power of 0 of BcMath number causes crash[/+][-]Power of 0 of BcMath number causes crash[/-][+]Power of 0 of BcMath number causes UB[/+]Fix phpGH-20006: Power of 0 of BcMath number causes UB
Fix GH-20006: Power of 0 of BcMath number causes UB
Merge branch 'PHP-8.5'