Skip to content

Segmentation fault (access null pointer) in Zend/zend_API.h:84 #16359

Closed

Description

@YuanchengJiang

Description

The following code:

<?php
$log_file = tempnam(sys_get_temp_dir(), 'php-curl-CURLOPT_WRITEFUNCTION-trampoline');
$fp = fopen($log_file, 'w+');
fwrite($fp, "test");
$ch = curl_init();
curl_setopt($ch, CURLOPT_WRITEFUNCTION, $fusion);
curl_setopt($ch, CURLOPT_URL, 'file://' . $log_file);
curl_exec($ch);

Resulted in this output:

/php-src/Zend/zend_API.h:847:6: runtime error: member access within null pointer of type 'zend_function' (aka 'union _zend_function')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/Zend/zend_API.h:847:6

PHP Version

nightly

Operating System

ubuntu 22.04

Activity

  1. devnexen commented on Oct 11, 2024

    @devnexen
    Member

    Occurs only since 8.4 with the conversion to FCC interface for function user.

  2. self-assigned this
    on Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions