html5 parser crash: dom_html_collection_named_item: Assertion `iter.candidate->type == XML_ELEMENT_NODE' failed.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Start at ext/dom/html_collection.c:58 and the dom_html_collection_named_item function, then reproduce the provided Dom\HTMLDocument chain on PHP 8.7. The work is done when the input no longer aborts with the assertion; preserve the example as a regression check if the repository's existing test structure supports it.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
The following code:
<?php
Dom\HTMLDocument::createFromString(<<<a
<!DOCTYPE html>
<b id="container">
a)
->getElementById('container')
->getElementsByClassName('')
->namedItem("here");
Resulted in this output:
php: /home/user/software/php-install/src/ext/dom/html_collection.c:58: dom_html_collection_named_item: Assertion `iter.candidate->type == XML_ELEMENT_NODE' failed.
Aborted
PHP Version
PHP 8.7.0-dev (cli) (built: Sep 23 2026 15:02:26) (NTS DEBUG)
Copyright © The PHP Group and Contributors
Zend Engine v4.7.0-dev, Copyright © Zend by Perforce
with Zend OPcache v8.7.0-dev, Copyright ©, by Zend by Perforce
Operating System
Ubuntu 24.04
- Ngôn ngữ chính
- C
- Star
- 40.4k
- Fork
- 8.2k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 113
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của php/php-src
-
Bug Status: Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Bug Status: Needs Triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Bug Status: Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Flaky hrtime.phpt test Đang mởBug Category: Tests Status: Verified
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Bug SAPI: fpm Status: Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NVIDIA/k8s-device-plugin#2061 · 1 bình luận ·
-
task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
vsanthanam/JBird#429 ·