Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
Geth MoarVM: ecfc0bc220 | (Nicholas Clark)++ | src/core/coerce.c
Avoid reading beyond the end of the string in MVM_coerce_s_i

The recent refactoring to use `MVMCodepointIter` resulted in certain strings (that are not valid numbers) causing the code to attempting to read beyond the end of the string. For example, `nqp::coerce_si("-")` would throw "«Iteration past end of grapheme iterator" instead of returning 0.
... (12 more lines)
10:21
MoarVM: 596be5246f | (Nicholas Clark)++ | src/core/coerce.c
Replace locale-"aware" <ctype.h> with ASCII-only code in MVM_coerce_s_i

We don't want (or need) implementations of isspace(c) or isdigit(c) with the overhead of locale handling.
MasterDuke nine: did you happen to notice logs.liz.nl/raku/2022-01-29.html#17:38-0002 ? 13:57
nine No, missed that due to server restart 14:00
nine nqp: my $a := MAST::Bytecode.new; $a.write_uint32_at((my uint $b := 4), 0); # this is how it's meant to be 14:31
camelia ( no output )
MasterDuke ah, right. LTA error though 16:00
nine Well it's NQP. It's supposed to be hard :D 16:09
I know what's wrong with github.com/MoarVM/MoarVM/issues/1656 and got a fix for the segfault (but not the bug that triggers it) 16:10
Geth MoarVM/fix_segfault_after_capture_replace_literal_arg: 2abb469945 | (Stefan Seifert)++ | src/6model/reprs/MVMCapture.c
Fix segfault after capture-replace-literal-arg with different kind

A comment above MVM_capture_replace_arg already said: "The callsite argument type is expected to be the same". Sadly comments are easy to miss and when arguments are replaced with values of different kinds, we can end up with e.g. a literal number for a callsite argument with kind obj and may try to dereference what we wrongly believe to be a pointer.
Fix by actually enforcing this rule. Fixes the segfault reported in GH #1656
16:19
MoarVM: niner++ created pull request #1658:
Fix segfault after capture-replace-literal-arg with different kind
16:21
MasterDuke `Frame has invalid bytecode start point 207994 (size 40358)` never seen this error before (this isn't on master, i'm playing around with pre-sizing the byte array we write frames into) 16:26
dogbert17 I see that nine is back in action. Welcome back :) 16:46
nine Thanks :) Nice knowing that I've not completely rusted in in the snow 16:49
Nicholas you have snow? All we have is wind. 16:50
I am really glad that you have located the cause of that bug as it was completely beyond me. 16:51
jnthnwrthngtn A lot of wind here too. The plant pots are all still on the terrace.
Nicholas aha :-)
yes. One of ours has made a leap from a low wall. A couple of times.
(over the past month) 16:52
nine Well they did have a lot of snow where we were vacationing. Now back to the usual brownish green
Nicholas aha right.
dogbert17 nine: github.com/MoarVM/MoarVM/issues/1628 has indeed been fixed 17:03
MasterDuke ugh, had to miss my usual week snowboarding these past two years. did do a long weekend in early 2020. we were talking about doing a long weekend next month, but it's tough with small kids anyway and then the crazy numbers in europe just put a nail in it 17:27
but i'm hoping i get out to the usual week next year
nine dogbert17: excellent 17:48
MasterDuke anyone mind taking a look at this diff and trying to spot what i'm missing? gist.github.com/MasterDuke17/9114b...5e3da1fc0d 20:46
for some reason $indx isn't ending up with the correct value
nine can't see anything obvious 21:55
MasterDuke what i find odd is that when it's wrong, the guess (new size) is high. it should only ever be low (since i have to adjust for the branch in the `@handlers` case manually) 22:01
Uploaded file: uploads.kiwiirc.com/files/eb362ecb...pasted.txt 23:33
oops
timo: you might find blog.janestreet.com/magic-trace/ interesting 23:34