Skip to content

undefined behavior zend_string.h #19979

@chongwick

Description

@chongwick

Description

The following code:

<?php
$v_325483 = 42;
$v_325457 = Uri\Rfc3986\Uri::parse($v_325483,);
$v_325458 = var_dump($v_325457,);
$v_325459 = array();
$v_325460 = '�~_~P~X';
$v_325468 = 'https://�~_~P~X.com/�~_~P~X?�~_~P~X=�~_~P~X';
$v_325461 = null;
$v_325462 = Uri\WhatWg\Url::parse($v_325468,$v_325461,);
$v_325462 = Uri\WhatWg\Url::parse($v_325460,$v_325462,$v_325459,);
$v_325463 = var_dump($v_325462,);

Resulted in this output:

/home/w023dtc/nightly_php/php-src/Zend/zend_string.h:191: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
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/w023dtc/nightly_php/php-src/Zend/zend_string.h:191:24

But I expected this output instead:

PHP Version

nightly

Operating System

ubuntu 22.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions