Missing zend_return_unwrap_ref() calls trigger assertion failures:
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend, testing-qa
Hướng nghiên cứu
Start by reading the linked issue #20628 and tracing the listed reproductions through RecursiveIteratorIterator::callHasChildren(), callGetChildren(), RecursiveFilterIterator::hasChildren(), and zend_call_method() in zend_test. Find where returned references need unwrapping, then add regression coverage for the reproductions and verify the assertion failures are gone.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The following cases trigger assertion failures, tested on latest 8.6 dev (0dbc4a7953a8aca38d0cf04fa4fb4ac076f00419)
php: Zend/zend_vm_execute.h:2167: const zend_op *ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER(zend_execute_data *, const zend_op *): Assertion `((call->func->common.fn_flags & (1 << 12)) && !zend_return_should_unwrap_ref(call)) ? (zval_get_type(&(*(ret))) == 10) : !(zval_get_type(&(*(ret))) == 10)' failed.
Aborted (core dumped)
`RecursiveIteratorIterator::callHasChildren()`
<?php
class Demo implements RecursiveIterator {
public bool $v = true;
public function getChildren(): ?RecursiveIterator { return null; }
public function &hasChildren(): bool { return $this->v; }
public function current(): mixed { return null; }
public function key(): mixed { return null; }
public function next(): void {}
public function rewind(): void {}
public function valid(): bool { return true; }
}
$r = new RecursiveIteratorIterator(new Demo());
var_dump($r->callHasChildren());
`RecursiveIteratorIterator::callGetChildren()`
<?php
class Demo implements RecursiveIterator {
public mixed $v = null;
public function &getChildren(): ?RecursiveIterator { return $this->v; }
public function hasChildren(): bool { return true; }
public function current(): mixed { return null; }
public function key(): mixed { return null; }
public function next(): void {}
public function rewind(): void {}
public function valid(): bool { return true; }
}
$r = new RecursiveIteratorIterator(new Demo());
var_dump($r->callGetChildren());
`RecursiveFilterIterator::hasChildren()`
<?php
class ConcreteRecursiveFilterIterator extends RecursiveFilterIterator {
public function accept(): bool { return true; }
}
class Demo implements RecursiveIterator {
public bool $v = true;
public function getChildren(): ?RecursiveIterator { return null; }
public function &hasChildren(): bool { return $this->v; }
public function current(): mixed { return null; }
public function key(): mixed { return null; }
public function next(): void {}
public function rewind(): void {}
public function valid(): bool { return true; }
}
$r = new ConcreteRecursiveFilterIterator(new Demo());
var_dump($r->hasChildren());
`zend_call_method()` from zend_test
<?php
class Demo {
public mixed $v = true;
public function &returnsRef() { return $this->v; }
}
$d = new Demo();
var_dump(zend_call_method($d, 'returnsRef'));
Cross-link #20628
- Ngôn ngữ chính
- C
- Star
- 41.8k
- Fork
- 8.5k
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 145
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc 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
-
ext/openssl: 8.2.31+/8.3.31+ fail to build against OpenSSL 1.0.2 (ASN1_STRING_get0_data in xp_ssl.c)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug Status: Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
php/php-src#25397 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SNMP accepts malformed remote portsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
php/php-src#25137 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug Status: Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
quoted_printable_encode() produces lines longer than 76 characters for bytes 0xF5 to 0xFFCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
not for AI lovers
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
OSGeo/gdal#15515 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Template: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
betaflight/betaflight#16014 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
ly05010419/MacNativeGames#2119 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100