Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.9k stars 540 forks source link

Assertion `SvTYPE(sv) != SVt_PVAV && SvTYPE(sv) != SVt_PVHV && SvTYPE(sv) != SVt_PVFM' failed #17168

Open p5pRT opened 4 years ago

p5pRT commented 4 years ago

Migrated from rt.perl.org#134473 (status was 'new')

Searchable as RT134473$

p5pRT commented 4 years ago

From geeknik@protonmail.ch

While fuzzing Perl v5.31.4-273-ge55ec39201 compiled with Clang 10 and UBSan\, the following assertion failure was observed.

./perl -e '[]\,@​V_=unemap2\,map$$A[$_]\,@​V_=nmap2\,map$$A[$_]\,@​V_=uneeeJ'

perl​: sv.c​:2435​: IV Perl_sv_2iv_flags(SV *const\, const I32)​: Assertion `SvTYPE(sv) != SVt_PVAV && SvTYPE(sv) != SVt_PVHV && SvTYPE(sv) != SVt_PVFM' failed. Aborted

tonycoz commented 4 years ago

This looks like another stack not refcounted bug. @V_ is being assigned to multiple times in the one list and it's values are being used as array indicies, hence Perl_sv_2iv_flags() complaining.