Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Applying zero offset to null pointer in Zend/zend_opcode.c #13931

@YuanchengJiang

Description

@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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions