On 11.04.2016 17:00, Moritz Lenz wrote: > On 04/11/2016 03:04 PM, Nicholas Clark wrote: >> On Mon, Apr 11, 2016 at 04:39:59AM -0700, H. Merijn Brand wrote: >> >>> In a one-liner: >>> >>> $ p6 -e'my$b=Buf.new(61,^2048 .map({256.rand.Int}));my Str >>> $u=$b.decode("utf8-c8");$u.=subst(/("a"|"b")/,{"c$0"},:g);' >>> Segmentation fault >>> >>> or (same code) >> >> With timotimo's commit from this afternoon: >> >> commit 808fd05041b3d846b0a54acc4297299af2a1b71d >> Author: Timo Paulssen <timona...@perpetuum-immobile.de> >> Date: Mon Apr 11 14:05:57 2016 +0200 >> >> cope with buffers being too small in re_nfg >> >> fixes a crash when working with utf8-c8 strings. >> >> >> that one liner changes from ASAN barfage to no output. >> (which means that the SEGV is fixed). >> >> That means it's now "tests needed" ? > > It is. > > I'd also be grateful if somebody could provide a deterministic string of > numbers that made Rakudo segfault, because I hate having fuzzy/random > tests in the test suite.
Turns out that somebody is me :-) This code coredumps reliably on a not-yet-patched rakudo for me: use v6; my @ints = 103, 248, 111, 217, 210, 97; my $b = Buf.new(@ints); my Str $u=$b.decode("utf8-c8"); $u.=subst("a","b"); Cheers, Moritz > Cheers, > Moritz >