| IRC logs at
Set by AlexDaniel on 12 June 2018.
timotimo uh oh 00:45
i think we have trouble with CArray inlined in CStructs
here CArray's destructor is trying to free its *storage, but it actually points to the inside of a CStruct's body
but the managed flag is still set for some reason
that's clearly not right
00:47 Kaiepi left 00:48 Kaiepi joined
timotimo i wonder if it should become part of the repr data 00:55
m: use NativeCall; class Test is repr<CStruct> { has int32 $.foo; has int32 $.bar; HAS int8[16] is CArray }; my @things; for ^100_000 { @things.push(; @things.pop; Nil } 01:02
camelia ===SORRY!=== Error while compiling <tmp>
Two or more attributes declared that both want an accessor method 'foo'
at <tmp>:1
timotimo m: use NativeCall; class Test is repr<CStruct> { has int32 $.foo; has int32 $.bar; HAS int8 @.bloop[16] is CArray }; my @things; for ^100_000 { @things.push(; @things.pop; Nil } 01:03
camelia (signal ABRT)*** Error in `/home/camelia/rakudo-m-inst-2/bin/moar': free(): invalid pointer: 0x0000000004435508 ***
======= Backtrace: =========
timotimo bisect: use NativeCall; class Test is repr<CStruct> { has int32 $.foo; has int32 $.bar; HAS int8 @.bloop[16] is CArray }; my @things; for ^100_000 { @things.push(; @things.pop; Nil }
bisectable6_ timotimo, Bisecting by exit signal (old=2015.12 new=e68e38e). Old exit signal: 0 (None)
timotimo, bisect log:
timotimo, (2018-08-07)
timotimo Bump nqp/moar for CStruct/CArray fix 01:06
well, that worked out ;) ;)
Geth: ver 01:07
Geth timotimo, version bump brought in these changes:
MasterDuke Geth: ver 01:20
Geth MasterDuke, version bump brought in these changes:
timotimo greppable6: HAS.*is\s+CArray 01:46
greppable6 timotimo, 1 line, 1 module:
02:04 AlexDaniel left 02:09 samcv left 02:12 samcv joined 02:19 AlexDaniel joined
MasterDuke timotimo: i just saw a "bailed completely" because of sp_bind_i32. how hard would it be to jit those sp_bind_* ops? 03:05
nine MasterDuke: as there are a number of sp_bind_* ops already jited, I guess it's quite easy. 07:03
07:52 domidumont joined 07:57 domidumont left 08:00 domidumont joined 09:26 AlexDani` joined 09:30 evalable6 left, benchable6 left, AlexDaniel left 09:35 scovit_ left, scovit joined
scovit timotimo: in my patch to get CStruct passed by value I was adding the same funtionality to CStruct inlined in CStructs 10:02
*storage should point inside the struct body so that you can do things like>1, y=>2); 10:03
what I think moar should do is to be able to recognize this situation and do not free the pointer
last time I checked this was not an issue since the CStruct just memleaks all over 10:05
10:14 evalable6 joined
scovit I mean this kind of code I think should work: 10:22
right now it wouldn't) 10:23
11:14 domidumont left 11:24 dogbert2_ joined 12:25 lizmat_ joined 12:26 dogbert21 joined 12:29 nebuchad` joined 12:30 harrow left, lizmat left, samcv left, nebuchadnezzar left, dogbert2_ left, camelia left, harrow joined, samcv joined 12:31 samcv left, samcv joined 12:33 camelia joined 12:41 lucasb joined 13:03 domidumont joined 13:43 nebuchad` is now known as nebuchadnezzar
nwc10 good *, #moarvm 13:45
ASAN is also really excited by t/spec/S02-types/sethash.t
(as well as the complete pavement pizza explosion with more-pea when trying to build NQP)
nwc10 wonders - is there a way to colect the full colour ouptut from ASAN, and paste it somewhere in colour? 13:46
masak screenshot? 13:54
nwc10 I was rather hoping for colour text 13:55
"JPG pasted into a word document" never feels like the right answer :-) 13:56
this was an idle thought
timotimo some terminals will let you copy-paste formatted text with colors and such 14:05
and if you have a browser with something like a textarea with ContentsEditable it'll paste that as HTML iiuc
jnthn: how would you prefer CArray and CStruct get signaled that their body pointer points inside an existing memory region, for example inlined structs/arrays inside other structs, or structs inside an array-of-struct 14:09
right now at least the CArray gets created with ->initialize when a CStruct is created or marshalled from C, and that blindly assumes the memory region is owned by the CStruct 14:10
should it be part of the repr data, and we'd add something to the compose protocol?
or would it be fine for the parent object to set a value before or after initialize; that sounds too ad-hoc, non-API, dirty 14:11
14:22 MasterDuke left 14:24 brrt joined, lizmat_ is now known as lizmat
brrt ohai #moarvm 14:25
hurrah for TPF in being accepted to GSoC
lizmat coooool!
brrt oh, i maybe shouldn't have said that on a logged channel
.oO( Probably nobody reads this )
lizmat oops
I didn't
tadzik no, nobody knows 14:26
brrt :-D
but I'm fairly excited 14:27
timotimo someone else already wrote that in a logged channel yesterday i think 14:47
brrt hehe 14:52
jnthn Wrote what? :) 15:04
yoleaux 24 Feb 2019 19:44Z <nwc10> jnthn: ASAN very excited by more-pea - heap-use-after-free when building NQP --
jnthn Oh...wrote to memory after free... :P
dogbert21 .seen timotimo 15:30
yoleaux I saw timotimo 14:47Z in #moarvm: <timotimo> someone else already wrote that in a logged channel yesterday i think
15:35 brrt left, domidumont1 joined 15:38 domidumont left 15:43 brrt joined 15:49 brrt left 16:17 AlexDani` is now known as AlexDaniel
Geth MoarVM: dcafbc4c72 | (Aleks-Daniel Jakimenko-Aleksejev)++ | src/core/nativecall.c
Revert "Change CStruct For Compatibility With Native Call JIT"

This partially reverts commit efdf568975cf38c2b711c3c9c6c2bb741bf89460.
timotimo dogbert21: sup? 16:35
16:59 brrt joined
brrt ohai jnthn 17:22
dogbert17 timotimo: I suggested to AlexDaniel that he should revert parts of efdf568975cf38c2b711c which he did 17:25
dogbert17 sort of suggested :) 17:26
AlexDaniel: I had a look at R#2665, I can't get the test to panic on its own, it only panics when trying to install the module via zef 17:29
synopsebot R#2665 [open]: [⚠ blocker ⚠] MoarVM panic when testing Red
AlexDaniel dogbert17: oh, so it *does* panic 17:30
dogbert17 with a zef install ... yes
AlexDaniel OK that makes more sense
because I think I was trying to reproduce it without zef
soooo… ok, that's some good info 17:31
17:46 robertle joined 17:49 domidumont joined 17:52 domidumont1 left 18:03 Kaiepi left
AlexDaniel dogbert17: ah-ha, yeah, I can reproduce it through zef 18:04
18:04 Kaiepi joined
dogbert17 AlexDaniel: cool 18:07
AlexDaniel dogbert17: yeah but… now what?
dogbert17 perhaps ugexe has some ideas 18:10
jnthn o/ brrt 18:22
jnthn has been a bit burried with stuff to do, but will be about a bit more for the rest of the week :)
nwc10 that's half \o/ and half not 18:23
I think the "forward looking statement" is the better half.
18:32 domidumont left
nwc10 and you're going to rain on ASAN's parade? 18:36
brrt ASAN is repeatedly raining on our parade, so it's only fair 18:53
timotimo at some point nobody will know who started the whole thing 18:59
19:01 brrt left, brrt joined 19:03 brrt left
timotimo bisectable6_: class ABC { has int32 $.x; multi method new(int32 :$x!) { self.bless(:$x) } }; => 0); 19:15
bisectable6_ timotimo, On both starting points (old=2015.12 new=9a87b56) the exit code is 1 and the output is identical as well
timotimo, Output on both points: «Lexical with name '$x' has a different type in this frame␤ in method new at /tmp/c5jP3thMj9 line 1␤ in block <unit> at /tmp/c5jP3thMj9 line 1␤␤»
timotimo hum?
in MVMContext's bind_key it got_kind 3 (MVM_int32) but wanted 4 (MVM_int64) 19:19
this probably wants a little bit of truncation magic just like in at_key?
this comes from bindkey_i, which always passes int64 ... 19:20
19:20 samcv_ joined
timotimo and there are no ops that bindkey_i32 or similar 19:20
19:20 samcv left
timotimo why it binds that in an MVMContext, i'm not entirely sure about, though. comes from the binder, apparently 19:20
19:21 Kaiepi left, squashable6 left 20:24 Kaiepi joined 20:41 patrickb joined 20:54 samcv_ is now known as samcv 21:18 squashable6 joined 22:47 MasterDuke joined 22:48 MasterDuke left, MasterDuke joined 23:01 lucasb left 23:13 Kaiepi left 23:14 Kaiepi joined 23:32 AlexDaniel left 23:37 AlexDaniel joined 23:42 AlexDaniel left 23:49 squashable6 left 23:51 squashable6 joined