[php-src] Issue #13931: Applying zero offset to null pointer in Zend/zend_opcode.c
| From: | YuanchengJiang | Date: | Wed, 10 Apr 2024 05:11:43 +0000 |
| Subject: | [php-src] Issue #13931: Applying zero offset to null pointer in Zend/zend_opcode.c | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246730@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/13931
Author: YuanchengJiang
### Description
The following testfile(phpt):
```
--TEST--
Applying zero offset to null pointer in Zend/zend_opcode.c
--FILE--
<?php
function foo () {
try {
break;
} finally {
}
}
foo();
?>
--PHPDBG--
ev 1 + 3 # ev 2 ** 3#q
--EXPECTF--
prompt> 4
8
Fatal error: 'break' not in the 'loop' or 'switch' context in
%stry_finally_011.php on line %d
```
Resulted in this output:
```
prompt> /php-src/Zend/zend_opcode.c:1094:30: runtime error: applying zero offset to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/Zend/zend_opcode.c:1094:30
```
### PHP Version
PHP 8.4.0-dev
### Operating System
ubuntu 22.04