Skip to content

Segmentation fault (access null pointer) in ext/dom/xml_common.h #15551

Closed

Description

@YuanchengJiang

Description

The following code:

<?php
$fragment = new DOMDocumentFragment();
$fusion = $fragment;
$nodes = $fusion->childNodes;
$iter = $nodes->getIterator();
$iter->next();

Resulted in this output:

Segfault
ext/dom/xml_common.h:33:36: runtime error: applying non-zero offset 18446744073709551592 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ext/dom/xml_common.h:33:36 in 

PHP Version

PHP 8.4.0-dev

Operating System

ubuntu 22.04

Activity

  1. devnexen commented on Aug 23, 2024

    @devnexen
    Member

    Can be reproduced from 8.2.

  2. added a commit that references this issue on Aug 23, 2024
    9e87e53
  3. added 2 commits that reference this issue on Aug 23, 2024
    9af574c
    8a00faa
  4. added a commit that references this issue on Aug 23, 2024
    6a07400
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