Autovivify undefined hash reference in list assignment
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #1960 của @fglock — đã merge
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Start by tracing shared list assignment for a hash dereference in the PerlOnJava runtime, then compare how both the JVM and interpreter backends handle an undefined scalar against an initialized hash reference. Add a focused regression for both cases; done means the reproducer passes on both backends, including the existing initialized-reference behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
List assignment into a hash dereference does not autovivify an undefined scalar on either PerlOnJava backend. This breaks pure-Perl code that initializes a hash reference with ($self, %$type) = @_ and then reads it.
Reproducer
my ($self, $type);
($self, %$type) = ('Object::Hybrid', reftype => 'HASH', tieable => 0, mutable => 0, caller => 0);
die "missing hash assignment" unless $type->{reftype} eq 'HASH';
System Perl 5.42.2 passes. PerlOnJava at master b43a65250 leaves $type undefined and the key missing on both the JVM and interpreter backends. Initializing $type to {} before the assignment makes both PerlOnJava backends pass.
CPAN evidence
Object-Hybrid 0.07 passed all 909 tests under system Perl. CPAN run 20261103-123832-91742 failed at t/Object-Hybrid.t line 21 after its first assertion, with No 'reftype' parameter specified; the same failure reproduces on both PerlOnJava backends.
Suspected runtime path
The failure is in shared list assignment to a hash dereference. The assignment replaces the pending autovivification hash before the referenced scalar becomes a hash reference. A focused regression should cover the undefined-scalar case and continue to pass when the hash reference is already initialized.
- Ngôn ngữ chính
- Perl
- Star
- 65
- Fork
- 8
- Merge trung bình
- 5 giờ 57 phút
- Pull request đã merge (30 ngày)
- 177
Chuẩn bị môi trường
- Có Dockerfile hoặc 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 fglock/PerlOnJava
-
area:runtime documentation enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
fglock/PerlOnJava#1579 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Honor scalar context for sort returned from a subroutineCó thể đã có người làm @fglock đã nhận hôm nay. Đang mởarea:runtime bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
fglock/PerlOnJava#1991 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:cpan-port area:parser bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
fglock/PerlOnJava#1990 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:parser area:unicode bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
fglock/PerlOnJava#1989 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:backend bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
fglock/PerlOnJava#1981 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của fglock/PerlOnJava
Issue tương tự
-
check_keywords.pl dies before reporting an unknown keyword categoryCó thể đã có người làm @zhaohai666 đã nhận 1 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 87/100
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 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
libwww-perl/HTTP-Message#236 ·
-
1.severity: security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
wave-followup
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100