dl() breaks expectations regarding permanent or interned strings
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C
- Star
- 40.4k
- Fork
- 8.2k
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 96
Mô tả
Description
Creating this ticket to keep track of some issues related to dl() and permanent / interned strings:
Extensions loaded during a dl() call will try to allocate persistent interned strings for class names, function names, ini entries, etc. Normally, this is not allowed during a request.
The default in-request implementation of zend_string_init_interned still allows it, but the opcache implementation will simply return a non-interned string.
Calling dl() breaks in RC_DEBUG builds: https://github.com/php/php-src/pull/8606
This also breaks internal enums. The test in this branch will crash in debug builds: https://github.com/php/php-src/compare/master...arnaud-lb:php-src:internal-enums-dl-crash?expand=1
PHP Version
PHP 8.0
Operating System
No response
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.
Hướng nghiên cứu
Bắt đầu với zend_string.c xung quanh zend_string_init_interned và ext/opcache/ZendAccelerator.c xung quanh các phần triển khai liên quan. Tái hiện hành vi của dl() trong một bản build RC_DEBUG, sau đó kiểm tra nhánh kiểm thử internal-enums-dl-crash và xác định cách xử lý dự kiến đối với các chuỗi persistent và interned giữa các extension.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- c, php
- Lĩnh vực
- backend
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 20/100