Skip to content

Soap segfault when classmap instantiation fails #16259

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
abstract class CT_A1 {
}
class CT_A2 extends CT_A1 {
}
$classMap = array("A1" => "CT_A1", "A2" => "CT_A2", "A3" => "CT_A3");
$client = new SoapClient(__DIR__."/bug36575.wsdl", array("trace" => 1, "exceptions" => 0, "classmap" => $fusion));
$a2 = new CT_A2();
$client->test($a2);
$soapRequest = $client->__getLastRequest();
$server = new SoapServer(__DIR__."/bug36575.wsdl", array("classmap" => $classMap));
$server->handle($soapRequest);

Resulted in this output:

/php-src/ext/soap/php_encoding.c:1206:23: runtime error: member access within null pointer of type 'zend_object' (aka 'struct _zend_object')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/ext/soap/php_encoding.c:1206:23

PHP Version

PHP 8.4.0-dev

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