02:56 ilbot3 joined 03:17 unicodable6 joined, benchable6 joined, squashable6 joined, reportable6 joined
Geth MoarVM: 736cfaa1e5 | (Zoffix Znet)++ | src/6model/reprs/VMArray.c
Zero out cut off elements when downsizing VMarray

Fixes RT#127756: rt.perl.org/Ticket/Display.html?id=127756
If we're downsizing, zero out the elements we're cutting off, to avoid rogue left over data showing up when we, say, index into those elements later on. ... (6 more lines)
06:46
synopsebot RT#127756 [new]: rt.perl.org/Ticket/Display.html?id=127756 setelems on native arrays doesn't clear the array
07:08 Kaiepi joined 09:11 Zoffix joined
Zoffix FWIW: realized above commit is crap and working on another one, but it's not that good either and is breaking splicing. Trying to figure it out ATM, but may have a nap before I change the above commit 09:12
Current version: gist.github.com/zoffixznet/cd550a4...a2172c606b feels like `if (repr_data->slot_type != MVM_ARRAY_OBJ)` shouldn't be needed, but without it, even empty script dies with "unknown QAST node VMNull" 09:13
and splice issue is this gist.github.com/zoffixznet/3017d65...91a1f6340c causes this drift... array[int64].new(0, 1, 2, 3, 4, 5, 6, 7, 0, 0, 10, 11) two zeros before "10, 11" that shouldn't be there.... 09:18
ooh fixed stuff; including the MVM_ARRAY_OBJ thing 09:57
\o/
samcv happy christmas eve everyone 10:12
yoleaux 23 Dec 2017 12:19Z <AlexDaniel> samcv: TIL, maybe you're interested to know this too. 兆 has a unival of 1000000000000 but you can't use it in the source code because its general category is Lo (so it thinks that it's an identifier)
Zoffix Happy to you too \o 10:17
Geth MoarVM: 888f7b74d1 | (Zoffix Znet)++ | src/6model/reprs/VMArray.c
Revert "Zero out cut off elements when downsizing VMarray"

This reverts commit 736cfaa1e5f4ea6b7ce58320c918059a53b68cc5.
This doesn't fix all cases of the issue and the real problem is further down the line.
10:20
MoarVM: 43c926f9e0 | (Zoffix Znet)++ | src/6model/reprs/VMArray.c
Fix failure to clear old VMArray elements in some cases

Fixes RT#127756: rt.perl.org/Ticket/Display.html?id=127756
  (O = Old cell; N = new cell; G = garbage left over data)
We currently correctly handle the case where we're up-sizing:
  |--|OO|OO|--|
... (18 more lines)
10:37
synopsebot RT#127756 [new]: rt.perl.org/Ticket/Display.html?id=127756 setelems on native arrays doesn't clear the array
Zoffix Ahhhh... Feels good to spend a few hours on a bug and fully understand why it was happening \o/
naptime
10:38 Zoffix left 10:41 cognominal joined 10:57 travis-ci joined
travis-ci MoarVM build errored. Zoffix Znet 'Revert "Zero out cut off elements when downsizing VMarray" 10:57
travis-ci.org/MoarVM/MoarVM/builds/320983102 github.com/MoarVM/MoarVM/compare/7...8f7b74d112
10:57 travis-ci left
Geth MoarVM: 09482f9bdd | (Zoffix Znet)++ | src/6model/reprs/VMArray.c
Do less work in zeroing out VMArray

We don't need to go up all the way to ssize, just until the old end of the stuff with data. The rest is already cleared from back when we resized ssize.
  (O = Old cell; N = new cell; G = garbage left over data)
  |--|OO|OO|--|
  |OO|OO|GG|--| <- conditional moves the old stuff and zeros the trash
  |NN|NN|--|--|
11:36
MoarVM: cb4c1941a8 | (Zoffix Znet)++ | src/6model/reprs/VMArray.c
Do even less work in VMArray clearing

By skipping the area between original start+elems and ssize
  (O = Old cell; N = new cell; G = garbage; C = newly cleaned space)
  |--|OO|OO|OO|--|
  |OO|OO|OO|GG|--|
... (9 more lines)
12:02
12:14 travis-ci joined
travis-ci MoarVM build passed. Zoffix Znet 'Do less work in zeroing out VMArray 12:14
travis-ci.org/MoarVM/MoarVM/builds/321000273 github.com/MoarVM/MoarVM/compare/4...482f9bdd27
12:14 travis-ci left 12:44 greppable6 joined 15:03 geospeck joined 16:24 coverable6 joined 17:59 dogbert17 joined
dogbert17 stumbles upon a bizarre Christmas SEGV 18:01
Thread 1 "moar" received signal SIGSEGV, Segmentation fault.
0x00007ffff76f9b55 in compute_allocation_strategy (tc=0x6049f0, repr_info=0x7ffff5e8d5e0, repr_data=0x4286870, st=0x7ffff5e76010) at src/6model/reprs/CStruct.c:214
214 bits = cstruct_repr_data->struct_size * 8;
(gdb) bt
#0 0x00007ffff76f9b55 in compute_allocation_strategy (tc=0x6049f0, repr_info=0x7ffff5e8d5e0, repr_data=0x4286870, st=0x7ffff5e76010) at src/6model/reprs/CStruct.c:214
#1 0x00007ffff76fa55b in compose (tc=0x6049f0, st=0x7ffff5e76010, repr_info=0x7ffff5e8db90) at src/6model/reprs/CStruct.c:339
#2 0x00007ffff764909f in MVM_interp_run (tc=0x6049f0, initial_invoke=0x7ffff7789e01 <toplevel_initial_invoke>, invoke_data=0x66cd90) at src/core/interp.c:2499
#3 0x00007ffff7789f66 in MVM_vm_run_file (instance=0x604010, filename=0x7fffffffe2ce "/home/dilbert/repos/rakudo/perl6.moarvm") at src/moar.c:401
#4 0x0000000000401459 in main (argc=10, argv=0x7fffffffde28) at src/main.c:256
18:09 nativecallable6 joined 19:51 ZofBot joined 20:20 statisfiable6 joined 20:23 bisectable6 joined, committable6 joined, bloatable6 joined, quotable6 joined 20:58 releasable6 joined, evalable6 joined 21:34 Geth joined
Geth MoarVM/fix-null-concat: b563f3564e | (Zoffix Znet)++ | src/6model/reprs/VMArray.c
Fix unwanted null strings in VMArray holes

Whenever we read past end or zero out str VMArrays, stick empty strings instead of a null pointer there.
Before:
  $ perl6 -e 'my str @a; @a[3] = "x"; dd @a'
... (6 more lines)
23:29
MoarVM: zoffixznet++ created pull request #767:
Fix unwanted null strings in VMArray holes
23:33