You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<Zoffix_> m: use nqp; my $h := nqp::hash("a", 42); my $i := nqp::iterator($h); nqp::deletekey($h, "a"); nqp::shift($i)
<camelia> rakudo-moar bf6451dac: OUTPUT: «(signal SEGV)»
The SEGV looks to be inside 3rdparty/uthash.h. I poked at it a bit, but didn't manage to fix.
After SEGV is fixed, we'll get could not find candidate in postfix:<{ }> because .pull-one from .keys would return a null. That IMO falls under DIHWIDT as the user is trying to iterate over the .keysSeq while reducing the number of available keys.
To workaround the DIHWIDT, simply reify the .keysSeq right away, by shoving keys into an Array or stick an .eager on it:
> set-base; r 'use nqp; my $h := nqp::hash("a", 42); my $i := nqp::iterator($h); nqp::deletekey($h, "a"); nqp::shift($i)'
> set-rakuast; > r 'use nqp; my $h := nqp::hash("a", 42); my $i := nqp::iterator($h); nqp::deletekey($h, "a"); nqp::shift($i)'
> ./rakudo-m -v
Welcome to Rakudo™ v2024.04-92-g24057e69c.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2024.04-6-g84121f0de.
The Problem
The following snippet causes Rakudo to SEGV:
Expected Behavior
Some kind of nice error message :-)
Actual Behavior
SEGV
Steps to Reproduce
See code snippet above
Environment
Camelia on irc, see https://irclog.perlgeek.de/perl6-dev/2017-12-24#i_15619001 for more information.
The text was updated successfully, but these errors were encountered: