Skip to content

Unexpected null pointer in Zend/zend_string.h #14808

Closed

Description

@YuanchengJiang

Description

The following code:

<?php
var_dump($args);
ob_start('ob_iconv_handler');
ob_clean();
$args = [];
$reflection = new ReflectionFunction('ob_get_contents');
$x = $reflection->invokeArgs($args);

Resulted in this output:

/php-src/Zend/zend_string.h:200:24: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here (memcpy)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/Zend/zend_string.h:200:24

PHP Version

PHP 8.4.0-dev

Operating System

ubuntu 22.04

Activity

  1. added a commit that references this issue on Jul 4, 2024
    88d7f93
  2. added 2 commits that reference this issue on Jul 4, 2024
    89c3e03
    519c435
  3. added a commit that references this issue on Jul 4, 2024
    279d82b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions