MasterDuke m: sub foo(Int $bar is rw where {$bar > 0}) { $bar }; say foo(Int) 02:08
camelia rakudo-moar 338a70: OUTPUT«Parameter '$bar' expected a writable container, but got Int value␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
MasterDuke m: sub foo(Int $bar where {$bar > 0}) { $bar }; say foo(Int)
camelia rakudo-moar 338a70: OUTPUT«Invocant requires an instance of type Int, but a type object was passed. Did you forget a .new?␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
MasterDuke m: sub foo(Int $bar? where {$bar > 0}) { $bar }; say foo() 02:10
camelia rakudo-moar 338a70: OUTPUT«Invocant requires an instance of type Int, but a type object was passed. Did you forget a .new?␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
MasterDuke i'm still trying to get a more informative error message for that third case, but i can't figure out why the parameter name isn't available
both errors are happening in bind_one_param in src/Perl/Metamodel/BOOTSTRAP.nqp 02:13
Perl6
but if i add a say($varname) at the site of the second error, it's just <anon>, no matter whether the parameter is named or position, required or optional 02:15
AlexDaniel why was #126956 closed? 04:31
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126956
AlexDaniel is it actually resolved?
dalek ast: def87d1 | usev6++ | / (9 files):
Unfudge tests on JVM
04:45
nine lizmat: many, many thanks for fixing DIR-RECURSE :) 07:09
lizmat nine: so what's the timing now ? 07:37
Files=1146, Tests=53237, 218 wallclock secs (12.85 usr 3.59 sys + 1330.10 cusr 123.95 csys = 1470.49 CPU) 07:38
seems to have a good effect on running spectests as well :-)
although it does seem one of the precomp tests fails now :-( 07:39
nine lizmat: 1.089s :) 07:51
lizmat ah, down from 47 or so? :-) 07:52
nine yes
Ticket is rt.perl.org/Public/Bug/Display.html?id=129776 btw
lizmat: I get All tests successful. 07:57
lizmat ah, hmmm....
yesterday I also got that, and now not... it's not a flapper
anyways... where is the SHA to check against stored anyway?
nine In the .repo-id files in the precomp directories. 07:59
It's basically an "If the repos are still the same as the state recorded in .repo-id, we can trust the dependency list. Otherwise we have to check if any of them got updated." 08:00
lizmat nine: so, if we would store the sha1 of each file of the repo it has found in there 08:01
so filename\tsha1
we would be able to check file by file and bail as soon as we have a mismatch 08:02
nine You'd still have to look for new files.
lizmat well, if the number of files is different, we'd bail without checking any of them
nine That would also break the abstraction as for example CURI calculates the id in a completely different way 08:03
lizmat ah, ok
so how about the idea of using filename / modified as the string to sha
with the exception of when it is too current, use now.Str 08:04
nine With your cool "round to now()" idea, it might even work :)
lizmat it would give some false positives
nine I just wonder if it'd be worth it. < 1s for an insane worst case doesn't sound that bad to me. In normal scenarios, you won't notice the shaing 08:05
lizmat if you would run again after the 2 second period
nine Well, could be tricky for the precomp tests, now that I think of it.
Could be. Doesn't have to be though. 08:07
lizmat well, running a profile shows that the private method in the new DIR-RECURSE iterator is the largest consumer of CPU 08:08
and that's already in NQP
so the overhead is really in scanning the dirs 08:11
nine Which we'll have to do in any case.
lizmat yup, so maybe shaing isn't the worst then 08:12
being able to sha1 directly from disk would be better
nine Unless we throw the whole architecture over board and devise a plan that works by looking for specific files... 08:13
lizmat but how would we spot new files then ?
nine New files only matter if they are dependencies of the module we load. But considering that the whole repo-id business is specifically for avoiding a dependency resolution, I'd say, don't got there :) 08:14
Also we only need to calculate the repo-id once per program run. Which ought to help a lot in really large applications which is also where you'll notice module loading time the most. 08:16
I would love to have Perl 6 versions of our applications at work just to compare load times :) Because when you load enough modules, you really start to notice Perl 5's compile time, even though it's crazy fast at compiling already.
lizmat afk& 08:36
psch r: say "foo".split(/./, 1) 09:05
camelia rakudo-jvm 2a1605, rakudo-moar 338a70: OUTPUT«(foo)␤»
psch r: say "foo".split(/./, 2)
camelia rakudo-moar 338a70: OUTPUT«( oo)␤»
..rakudo-jvm 2a1605: OUTPUT«Error in socket connection:org.perl6.nqp.runtime.UnwindException␤ at org.perl6.nqp.runtime.ThreadContext.<init>(ThreadContext.java:125)␤ at org.perl6.nqp.runtime.GlobalContext.getCurrentThreadContext(GlobalContext.java:340)␤ at org.perl6.nqp.runtime.G…»
psch that's probably gonna be fun
r: "foo".match(/./, :1x) 09:06
camelia ( no output )
psch r: "foo".match(/./, :2x)
camelia ( no output )
psch *that* is weird, 'cause split with limit calls into .match with :x
oh, wait, as a Range 09:07
r: "foo".match(/./, :x(^2))
camelia ( no output )
psch r: "foo".match(/./, :x(1..2))
camelia ( no output )
psch r: "foo".match(/./, :x(1..2), :g)
camelia ( no output )
psch huh, the leaking exception is $EX_CAT_RETURN..? 09:08
r: say "foo".split(/./, *) 09:12
camelia rakudo-jvm 2a1605, rakudo-moar 338a70: OUTPUT«( )␤»
psch r: say "foo".match(/./, :x(Inf)) 09:13
camelia rakudo-jvm 2a1605: OUTPUT«in Str.match, got invalid value of type Num for :x, must be Int or Range␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
..rakudo-moar 338a70: OUTPUT«in Str.match, got invalid value of type Num for :x, must be Int or Range␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
psch r: say "foo".match(/./, :x(*))
camelia rakudo-jvm 2a1605, rakudo-moar 338a70: OUTPUT«(「f」 「o」 「o」)␤»
psch r: say "foo".match(/./, :x(1..3))
camelia rakudo-jvm 2a1605, rakudo-moar 338a70: OUTPUT«(「f」 「o」 「o」)␤»
psch r: my \matches = "foo".match(/./, :x(1..3)); say +matches 09:44
camelia rakudo-jvm 2a1605: OUTPUT«Error in socket connection:org.perl6.nqp.runtime.UnwindException␤ at org.perl6.nqp.runtime.ThreadContext.<init>(ThreadContext.java:125)␤ at org.perl6.nqp.runtime.GlobalContext.getCurrentThreadContext(GlobalContext.java:340)␤ at org.perl6.nqp.runtime.G…»
..rakudo-moar 338a70: OUTPUT«3␤»
psch aha!
r: my \matches = "foo".match(/./, :x(1..3)); say matches.WHAT
camelia rakudo-moar 338a70: OUTPUT«(List)␤»
( no output )
psch r: my \matches = "foo".match(/./, :x(1..3)); say matches.WHAT
camelia rakudo-jvm 2a1605, rakudo-moar 338a70: OUTPUT«(List)␤»
psch r: my \matches = "foo".match(/./, :x(1..3)); say matches.elems
camelia rakudo-jvm 2a1605: OUTPUT«Error in socket connection:org.perl6.nqp.runtime.UnwindException␤ at org.perl6.nqp.runtime.ThreadContext.<init>(ThreadContext.java:125)␤ at org.perl6.nqp.runtime.GlobalContext.getCurrentThreadContext(GlobalContext.java:340)␤ at org.perl6.nqp.runtime.G…» 09:45
..rakudo-moar 338a70: OUTPUT«3␤»
psch r: my \matches = "foo".match(/./, :x(1..3)); say matches[0]
camelia rakudo-jvm 2a1605, rakudo-moar 338a70: OUTPUT«「f」␤»
psch r: my @matches = "foo".match(/./, :x(1..3)); say @matches.elems
camelia rakudo-jvm 2a1605: OUTPUT«Error in socket connection:org.perl6.nqp.runtime.UnwindException␤ at org.perl6.nqp.runtime.ThreadContext.<init>(ThreadContext.java:125)␤ at org.perl6.nqp.runtime.GlobalContext.getCurrentThreadContext(GlobalContext.java:340)␤ at org.perl6.nqp.runtime.G…»
..rakudo-moar 338a70: OUTPUT«3␤»
psch r: "foo".match(/./, :x(1..3)); say $/ 09:46
camelia rakudo-jvm 2a1605, rakudo-moar 338a70: OUTPUT«(「f」 「o」 「o」)␤»
psch r: "foo".match(/./, :x(1..3)); say +$/
camelia rakudo-jvm 2a1605: OUTPUT«Error in socket connection:org.perl6.nqp.runtime.UnwindException␤ at org.perl6.nqp.runtime.ThreadContext.<init>(ThreadContext.java:125)␤ at org.perl6.nqp.runtime.GlobalContext.getCurrentThreadContext(GlobalContext.java:340)␤ at org.perl6.nqp.runtime.G…»
..rakudo-moar 338a70: OUTPUT«3␤»
psch so basically we get some kind of really wonky List, from the looks of it? 09:54
r: gather do for (1,2,3) -> $x { take $x }.cache 09:56
camelia ( no output )
psch r: say +(gather do for (1,2,3) -> $x { take $x }.cache)
camelia rakudo-jvm 2a1605, rakudo-moar 338a70: OUTPUT«3␤»
psch r: say +(gather do for (1,2,3) -> $x { take $x; last }.cache)
camelia rakudo-jvm 2a1605: OUTPUT«Error in socket connection:org.perl6.nqp.runtime.UnwindException␤ at org.perl6.nqp.runtime.ThreadContext.<init>(ThreadContext.java:125)␤ at org.perl6.nqp.runtime.GlobalContext.getCurrentThreadContext(GlobalContext.java:340)␤ at org.perl6.nqp.runtime.G…»
..rakudo-moar 338a70: OUTPUT«1␤»
psch ...i think we have that in a test already somewhere that's not bound to .split 09:57
r: say +(gather do for (1,2,3) -> $x { take $x; last }) 09:58
camelia rakudo-jvm 2a1605: OUTPUT«Error in socket connection:org.perl6.nqp.runtime.UnwindException␤ at org.perl6.nqp.runtime.ThreadContext.<init>(ThreadContext.java:125)␤ at org.perl6.nqp.runtime.GlobalContext.getCurrentThreadContext(GlobalContext.java:340)␤ at org.perl6.nqp.runtime.G…» 09:59
..rakudo-moar 338a70: OUTPUT«1␤»
psch r: say +(gather do for (1,2,3) -> $x { take $x; last; return 0 })
camelia rakudo-moar 338a70: OUTPUT«1␤»
( no output )
psch aaanyway, yeah, enough spam probably :| 10:00
right, so something in GATHER or the resultant Iterator leaks an UnwindException on jvm 10:27
which probably means we're missing to gen an unwind handler for &GATHER..? 10:28
arnsholt Sounds like it, yeah 10:41
jnthn GATHER is interesting in that it also resumes after the take exception 10:42
psch ooh, actually i think we change what kind of handlers we gen depending on whether we have anything that throws CX
jnthn (No idea if that's related to what you're hunting, though.) 10:43
(But it does mean the same handler can be hit many times)
psch so if we have the last call we might mess up some other handler..?
jnthn: it sounds like it could be related. i mean, the leaking UnwindException is EX_CAT_RETURN, so it's not the last itself 10:44
jnthn Hmm 10:45
psch and it leaks out all the way to qb_11, which is the perl6 entry point afaict
so it's looking for a specific return handler and doesn't find it i guess?
jnthn Well, uncaught UnwindException would I guess mean that we found the handler "in theory", but then something went very wrong when trying to unwind to it 10:46
Which might suggest a mismatch between what was really on the call stack and the .caller chain
psch i mostly don't get where the return unwind comes from, honestly 10:48
uh 10:51
okay, so i have a debugnoop before the gather/take/last statement
and wanted to stop at ExceptionHandling.handlerDynamic
and we didn't even go there
as in, it went straight ahead to the leaking unwind in invokeDirect 10:52
maybe it's a lexical handler..?
it shouldn't be, right? cause there was already talk of the caller chain, and that's handlerDynamic... 10:53
aha, but it *is* lexical
and it is a return CX that ends up in handlerLexical 10:54
dalek kudo/nom: 9eae3c2 | lizmat++ | src/core/Rakudo/Internals.pm:
Squeeze another 25% out of DIR-RECURSE

Turns out stats at nqp level aren't as expensive as they were thought to be. So do those first before checkng whether the name is acceptable as file or dir. Since the $*REPO.id uses a regex, this makes things a lot faster as there are fewer matches needed.
11:55
nine Perl, the language with the fastest and the slowest regexes... 12:00
lizmat :-) 12:07
Str.match still way up in the profiles 12:08
dalek kudo/nom: 12a71fe | lizmat++ | src/core/Regex.pm:
Make Regex.Bool about 2x as fast

  - rewrite using nqp ops
  - don't return on success, just fall off
12:28
ilmari lizmat++ # MOAR FASTAR! 12:30
travis-ci Rakudo build failed. Elizabeth Mattijsen 'Squeeze another 25% out of DIR-RECURSE 12:41
travis-ci.org/rakudo/rakudo/builds/165502441 github.com/rakudo/rakudo/compare/3...ae3c2144ca
buggable [travis build above] ☠ Did not recognize some failures. Check results manually
pmurias is it known that state variables are not serialized properly? 12:50
that is, their content is not serialized at all
lizmat do you mean state variables that get initialized in a BEGIN block ? 12:55
otherwise, how would they need to be serialized ?
jnthn Don't think it was ever intended to serialize them 12:58
Same with lexicals generally except those explicitly installed at compile time
dalek p: 2d88d98 | usev6++ | src/vm/jvm/QAST/Compiler.nqp:
Fix handling of QAST::Want on JVM (2)

There were two places where 'v' was used instead of $RT_VOID. After changing those, we can test for void context in handling of QAST::Want.
Fixes NPE with 'sub f { sub { say 1 } }; f()()'.
13:03
p: 82cae67 | (Zoffix Znet)++ | src/vm/jvm/QAST/Compiler.nqp:
Merge pull request #311 from usev6/jvm_qast_want

Fix handling of QAST::Want on JVM (2)
psch bartolin++
pmurias lizmat: yes, the bug is when we create a closure with a state variable in a variable and then serialize it
[Coke] is very excited to see all these JVM fixes! 13:04
pmurias jnthn, lizmat: paste.debian.net/857808 # example of the bug in place 13:05
jnthn
.oO( DIHWIDT )
13:12
perlpilot pmurias: how important is it that you do that with BEGIN? Could you use my $closure = once { ... } instead? 13:18
jnthn I guess if it's really wanted it's likely not all that difficult to implement. 13:19
pmurias perlpilot: it's not something I want to do, I just noticed that bug while looking how state is implemented while preparing to reimplement it on the js backend 13:22
perlpilot jnthn: I know this is a weak argument for keeping things the way they are, but in Perl 5, BEGIN blocks are ephemeral, compile-time things. So, a P5er might balk at my $closure = BEGIN { } even working. 13:25
(maybe that's really an argument for making it work because this is Perl 6 after all :)
jnthn Yeah...
I mean, I don't really consider it a bug in so far as I conciously decided (3 times - Parrot, Moar, and JVM) not to actually implement it. ;)
And it's taken until now for somebody to notice, and it's not even a concrete use case :) 13:26
perlpilot indeed
jnthn That said, I don't have any particular objections to it happening. 13:27
I don't immediately see it'll cause us problems
pmurias sent a mail to [email@hidden.address] 13:33
dalek kudo/nom: faea193 | lizmat++ | src/core/CompUnit/Repository/FileSystem.pm:
Make $*REPO.id again 35% faster

  - call Str.match directly
  - use nqp::ops to open/set encoding/ read file
use lib "."; say $*REPO.id now down to .35 seconds in rakudo checkout
13:35
lizmat afk&
perlpilot I guess it's the same thing as my $foo = BEGIN 5; except that "5" is more like "do { ... };" 13:36
jnthn Heh, and that used to be 5s? :) lizmat++ 13:37
MasterDuke_ there seem to be a bunch more people around now, would anyone happen to have a thought about my question from last night? irclog.perlgeek.de/perl6-dev/2016-...i_13343690 13:51
nine Oh, yes, lizmat++ 13:54
psch m: sub f(Int $bar? where { $_.VAR.name.say }) { }; f(1) 13:57
camelia rakudo-moar faea19: OUTPUT«$topic␤»
psch MasterDuke_: ^^^ i think it's related to that, BOOTSTRAP.nqp:393-508 is around where i'd look closer 13:58
MasterDuke_: post constraints do lexpad stuff, as well as the binding before, although i don't have the brains right now to look closer 13:59
MasterDuke_ hmm, what is "attributive binding"? 14:00
psch i think that's the BUILD magic? 14:02
i.e. BUILD($!a) { }
MasterDuke_ so line 393 is this: "unless $is_attributive || !$has_varname {". so all the code inside that unless has an actual $varname (i.e., not '<anon>') to work with 14:05
and i don't understand why my examples don't have a $varname 14:06
since the signature isn't sub foo(Int $) or anything like that, and i also get the same error with a named parameter and explicitly passing a type instance for that parameter 14:09
psch m: sub f(Int $bar) { }; f(Int) 14:13
camelia ( no output )
psch m: sub f(Int:D $bar) { }; f(Int)
camelia rakudo-moar faea19: OUTPUT«Parameter '$bar' requires an instance of type Int, but a type object was passed. Did you forget a .new?␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch m: sub f(Int $bar where Int:D) { }; f(Int) 14:14
camelia rakudo-moar faea19: OUTPUT«Constraint type check failed for parameter '$bar'␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch m: Int > 0
camelia rakudo-moar faea19: OUTPUT«WARNINGS for <tmp>:␤Useless use of ">" in expression "Int > 0" in sink context (line 1)␤Invocant requires an instance of type Int, but a type object was passed. Did you forget a .new?␤ in block <unit> at <tmp> line 1␤␤»
psch MasterDuke_: ^^^ that is the error you get
MasterDuke_: from that place, too
MasterDuke_: as in, the '<anon>' varname is for the &infix:['<'] call inside the post constraint
m: sub f(Int $bar where { try $bar > 0; False if $! } ) { }; f(Int) 14:15
camelia rakudo-moar faea19: OUTPUT«WARNINGS for <tmp>:␤Useless use of ">" in expression "$bar > 0" in sink context (line 1)␤Constraint type check failed for parameter '$bar'␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch m: sub f(Int $bar where { try so $bar > 0 or False if $! } ) { }; f(Int) # without sink warning 14:16
camelia rakudo-moar faea19: OUTPUT«Constraint type check failed for parameter '$bar'␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch ...i think, i might've gotten my precs confused a bit :P
yeah, i think i did. statement if is always the whole statement isn't it 14:17
MasterDuke_ interesting
psch anyway, yeah, the point stands. the "Invocant..." is for the &infix:['<'] call
m: sub f(Int $bar where { ($bar // -1) < 0 }) { }; f(Int) 14:18
camelia ( no output )
psch m: sub f(Int $bar where { ($bar // -1) > 0 }) { }; f(Int)
camelia rakudo-moar faea19: OUTPUT«Constraint type check failed for parameter '$bar'␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
MasterDuke_ however, i believe in my testing i printed out the varname at the very beginning of bind_one_param and i never saw the name i gave it 14:20
i guess i don't grok the complete binding control flow 14:21
it's evaluating the post-constraint first? which is why it doesn't know the name?
psch no, it dies during running the code that is the post constraint, and prints the exception it dies with there 14:22
MasterDuke_ wait, but it has to know the name, because the post-constraint can refer the parameter by name
psch which is &infix:['<'], which binds params again 14:23
travis-ci Rakudo build failed. Elizabeth Mattijsen 'Make $*REPO.id again 35% faster
travis-ci.org/rakudo/rakudo/builds/165527590 github.com/rakudo/rakudo/compare/1...ea193ec956
MasterDuke_ ah, binds parameters again, of course
buggable [travis build above] ☠ Did not recognize some failures. Check results manually
dalek ast: acf4330 | (Zoffix Znet)++ | S32-num/int.t:
[coverage] Cover all* of Int.pm

  *The several currently commented out subs due to RT#128655
possibly remain uncovered.
  rt.perl.org/Ticket/Display.html?id=128655
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128655
MasterDuke_ any thoughts on how to get the name(s) available to the call to &infix:['<']? 14:24
[Coke] tries out the google translate app on ios after years of not looking at it. wow
[Coke] uses it to turn this IRC window into German. 14:25
dalek kudo/nom: a8006cd | (Zoffix Znet)++ | src/core/Int.pm:
Include RT# in comments to clarify why subs are commented out

  rt.perl.org/Ticket/Display.html?id=128655
psch MasterDuke_: i'd probably CATCH the stuff inside the post constraint and add it to the constraint type check error
MasterDuke_: although to do that neatly you'd probably want a typed exception for post constraint failures that has a $!nested_ex or something attr 14:26
m: sub f($x where { $x == 5 or try die "not like this"; $!.message.say andthen False if $! }) { }; f 1 14:27
camelia rakudo-moar faea19: OUTPUT«not like this␤not like this␤Constraint type check failed for parameter '$x'␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch so you get something sorta like that, maybe
well, except probably the other way around, i.e. "Constraint type check..." first, then the inner cause for the failure if any 14:28
MasterDuke_ cool, i'll try playing around with that 14:29
psch: thanks for the help. now off to less fun things... 14:31
[Coke] t/04-nativecall/13-union.t failing here. 14:35
... rebuilding with one or two more commits... 14:36
p3rln00b [Coke]: what OS?
[Coke] os x, I just saw you mentioned this in #perl6 14:37
p3rln00b Yeah, it's been flapping for ages.
23 days ago, to be exact. That's when harness was fixed and travis started to complain, but it was flopping earlier too, most likely. 14:38
jnthn Anyone tried running it under valgrind or ASAN?
p3rln00b doesn't have OSX :(
jnthn Me either
Though running it under that on Linux may show up a problem we "get away with" 14:39
(I've more than once fixed an "on OSX only" bug that left me thinking "how did it ever work anywhere..." :)) 14:40
p3rln00b :)
[Coke] jnthn: I can try. 14:42
"valgrind ./perl6 -Ilib t/04-nativecall/13-union.t" causes it to pass. 14:44
jnthn bah
[Coke] (valgrind-3.11.0) 14:45
jnthn oh
It passes on Linux
But
ok 24 - sizeof(UnionOfStructs)
==13957== Conditional jump or move depends on uninitialised value(s)
==13957== at 0x5004341: get_attribute (CUnion.c:403)
[Coke] \o/
jnthn That looks a tad dubious
[Coke] tries to upgrade his valgrind to see if he can at least get that error. 14:46
jnthn Did it on a second run too 14:48
I'm a bit tied up with $other-job task at the moment alas
[Coke] p3rln00b: can you open a ticket with the bug and jnthn's notes here? 14:49
p3rln00b Is "new ticket" button ever comming back to RT? 14:50
nine CUnion.c:402 and 403 are: void *cobj = get_ptr_at_offset(body->cunion, repr_data->struct_offsets[slot]); if (cobj) { ... 14:52
I wonder how cobj can be uninitilized there
p3rln00b [Coke]: done: rt.perl.org/Ticket/Display.html?id=129819 14:53
nine Ah, it's the field in body->cunion that may be uninitialized
[Tux] This is Rakudo version 2016.09-140-gfaea193 built on MoarVM version 2016.09-15-gc8b4228 14:54
csv-ip5xs 3.139
test 18.918
test-t 7.190
csv-parser 17.865
nine As get_ptr_at_offset is really just hiding the pointer arithmetic there
[Coke] p3rln00b: not until we have a fix for whatever allowed the spam storm in the perl5 queue. 14:57
p3rln00b I may just write a bug reporting program... 14:58
travis-ci Rakudo build failed. Zoffix Znet 'Include RT# in comments to clarify why subs are commented out 15:31
travis-ci.org/rakudo/rakudo/builds/165542790 github.com/rakudo/rakudo/compare/f...006cd5aaad
dogbert17 it's silent in here 17:03
p3rln00b bangs on pots and pans 17:05
dogbert17 FWIW I got inspired by [Coke] and jnthn discussing t/04-nativecall/13-union.t so I valgrinded all tests in t/04-nativecall/. Five of them complains about fifferent things.
uninitalized reads, suspicious jumps etc 17:06
psch dogbert17: that sounds useful to know 17:07
dogbert17 02-simple-args.t, 08-callbacks.t, 11-cpp.t, 13-union.t and 15-rw-args.t
psch dogbert17: afair valgrind output is pretty comprehensive, maybe you wanna try and take a crack at digging deeper?
dogbert17 in that case I need to know how to compile wuth debug because now I get: 17:09
ok 10 - Perl's rw variable was passed and returned by C (float)
==6858== Invalid write of size 8
==6858== at 0x40F1A34: MVM_nativecall_invoke (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
y
psch dogbert17: configuring moar with --debug --no-optimize and then make install should give you debug symbols 17:10
dogbert17 psch: thx
psch dogbert17: you don't need to recompile nqp and rakudo if they've been built with the current checkout of your moar repo
dogbert17 good to know
p3rln00b don't forget to pass the right --prefix 17:15
psch right, you do have to keep what's currently configured
well, aside from --debug and --no-optimize
dogbert17 :( fail. This is what I usually do: perl Configure.pl --gen-moar --gen-nqp --backends=moar 17:25
psch dogbert17: you shouldn't do anything in $rakudo-checkout
dogbert17 where then 17:26
psch dogbert17: go to $rakudo-checkout/nqp/MoarVM/
dogbert17: there you do 'perl Configure.pl --no-optimize --debug --prefix=$rakudo-prefix'
dogbert17: then 'make install'
dogbert17: note that $rakudo-prefix is the prefix you gave to Configure.pl in $rakudo-checkout 17:27
dogbert17: it's *probably* $rakudo-checkout/install, but not necessarily
dogbert17 psch: thx again will try immediately
stupid question, the Comfigure line I posted (and have used) doesn't have a $rakudo-prefix 17:36
should I refrain from specifying one then?
psch dogbert17: rakudo defaults to ./install for --prefix 17:39
dogbert17: in fact it should even say so during Configure.pl
dogbert17: so your MoarVM prefix would be $rakudo-checkout/install 17:40
dogbert17 and $rakudo-checkout is the directory where I cloned rakudo? 17:41
it works ..... psch++ for being patient with a noob :-) 17:44
nine dogbert17: we've all been there at one point :) 17:46
dogbert17 here's the relevant output from running t/04-nativecall/02-simple-args.t 17:47
ok 14 - passed ssize_t -42
==12118== Conditional jump or move depends on uninitialised value(s)
==12118== at 0x40BA2D0: MVM_callsite_destroy (callsite.c:100)
==12118== by 0x40BA2F7: MVM_callsite_destroy (callsite.c:105)
==12118== by 0x41C8A0F: cleanup_callsite_interns (moar.c:373)
==12118== by 0x41C94E1: MVM_vm_destroy_instance (moar.c:444)
==12118== by 0x8048EB8: main (main.c:194) 17:48
psch that looks a lot to moar-gutsy for my knowledge 17:50
maybe nine++ has an idea
nine No idea. But I've started looking through places where MVMCallsite objects are allocated but arg_names is not initialized 17:56
Well, callsite.c is clean 18:01
Oh, it's NativeCall related. So NativeCall code might be a better place to look at... 18:04
psch nine: so the best guess is that NC sets up a not-fully-alloc'd CallSite?
nine The only place in NativeCall code that allocates a Callsite is unmarshal_callback but that uses MVM_calloc, so arg_names should be properly NULLed 18:10
Actually MVM_callsite_copy can leave arg_flags uninitialized if cs_flags_count is 0 18:13
find_invokee_internal may be guilty. Uses malloc to allocate the MVMCallsite but doesn't initialize arg_names 18:15
dogbert17: if you're bored, you could re-test with this commit :) github.com/niner/MoarVM/commit/047...a49b38bb86 18:25
dogbert17 nine: not borde at all, will test 18:36
s/borde/bored/
and ..... the error is gone, nine++ 18:49
p3rln00b \o/ nine++
psch nine++ 18:50
nine :) 18:51
dogbert17 I had the same error in t/04-nativecall/11-cpp.t and it is also gone :-)
geekosaur hm, while poking at callback stuff, perhaps a default exception handler would be a good idea 18:53
there's not much you can do other than output the exception and die, but that's better than the current situation (outputs "unwound stack and didn't find handler" and dies, with no indication of the actual exception) 18:54
FROGGS nine++ 18:55
nine Btw FROGGS, you may be able to answer my question about CUnion: If cunion points at the actual C union, why do we interpret its members as pointers in get_ptr_at_offset? 18:58
FROGGS nine: that is about a union holding a struct, union or pointer or somthing 19:01
something*
nine Aah...because it's in the case MVM_reg_obj 19:02
FROGGS aye
nine But if it's an inlined struct? 19:04
lizmat just merged nine++ 's PR 19:05
nine FROGGS: if it's an inlined struct as in class UnionOfStructs is repr('CUnion') { HAS MyStruct $.a; HAS YourStruct $.b; }, it's not actually a pointer but one of the struct's members, isn't it? 19:06
geekosaur pops the callback thing onto the recent ticket 19:07
FROGGS nine: if it is HAS, then it is inlined, true
I guess that's not supported atm though
(except when it is) 19:08
nine Yes, that seems to be the reason for valgrind complaining about 13-union.t :) 19:10
FROGGS hmm 19:11
nine Fix coming up 19:12
dalek ast: 1533f71 | usev6++ | S05-modifier/counted.t:
Relax fudging for JVM a bit
19:13
nine Oh, the same is wrong with inlined CPP structs. Easy to spot because those too don't access cobj :) 19:14
FROGGS I see
so we just have to check upfront that things are inlined? 19:15
nine spectesting 19:24
dogbert17 here's same scary valgrind stuff to look at while spectesting :) gist.github.com/dogbert17/b763306b...0323a56228 19:25
p3rln00b did you run perl6 with full cleanup or whatever it is? 19:27
there's a perl6*vallgrind* executable in rakudo's checkout
dogbert17 I ran ./perl6-valgrind-m -Ilib t/04-nativecall/15-rw-args.t 19:28
p3rln00b k :)
buggable is leaking too. Gonna try to find some time to narrow down the leakage (likely regexes) after roast coverage work is done. 19:29
nine PR sent 19:31
lizmat merged 19:32
afk again& 19:33
moritz that escalated quickly :-)
lucasb_ moar/nqp bump still required to silence travis failures, right? 19:37
nine think so 19:38
p3rln00b yeah 19:39
Anyone doing it? :) 19:40
Guess not :) I 19:47
I'm gonna do it in 1 hour then
dalek p: 9a29753 | moritz++ | tools/build/MOAR_REVISION:
Bump moar version
19:49
moritz faster
p3rln00b \o/
moritz free karma \o/
dalek kudo/nom: 605f272 | moritz++ | tools/build/NQP_REVISION:
Bump NQP version
p3rln00b moritz++
nine dogbert17: I think...I got your scary 32 bit 15-rw-args.t bug 19:50
PR sent :) 20:00
dogbert17: PR has been merged. As I don't have quick access to a 32 bit installation, I'd be grateful if you could re-valgrind 15-rw-args.t 20:07
[Coke] nine++ dogbert17++
dalek ast: 819a390 | usev6++ | S0 (5 files):
Unfudge tests for JVM
20:13
dogbert17 sry, was watching TV, nine++ 20:16
will test once the build is complete 20:17
nine The CUnion fix should fix 2 RT tickets :) 20:18
FROGGS \o/
nine At least there are 2 I could find
FROGGS nine: fyi: valgring is happy with t/04-nativecall using libffi on my x64 linux box 20:27
nine cool :) 20:31
FROGGS t/04-nativecall/05-arrays.t .............. 1/? ==20253== Invalid read of size 4
:o(
using dyncall 20:32
nine Odd. It doesn't report that here?
FROGGS ==20253== at 0x4FC207C: MVM_nativecall_make_cstruct (nativecall.c:152) 20:35
==20253== by 0x500073F: at_pos (CArray.c:297)
my test is still running but afterwards I'll try to reproduce it
dogbert17 nine++ the errors are gone on 32 bit
FROGGS damn, cant reproduce 20:38
well, that settles it... 20:43
gnight
nine I guess I'll never again be able to make clames to NativeCalls beauty :) rt.perl.org/Ticket/Display.html?id...xn-1430469 20:46
mst oh my fucking god. 20:47
geekosaur it's trying to talk to C. it'll never be truly beautiful
nine Well some way to map a type to char[65] would help a lot there :) 20:48
geekosaur you have to parse C structures. this is perl5's h2ph, haskell's hsc2hs, etc. 20:49
mst nine: yeah. which is presumably doable. 20:53
geekosaur well, it loses the intended "it just works". but, when it comes to C, "it just works" stops when you run headlong into C's conflation of array and pointer 20:55
dogbert17 nine: it turns out that there's one test which still outputs scary stuff t/04-nativecall/08-callbacks.t 21:10
and this scary stuff can be found here: gist.github.com/dogbert17/2eff5a72...6395b8ec88
AlexDaniel for those using bisectable: we are at 850+ commits right now. Normally this would've been done long time ago, but due to #129781 we can't really parallelize it. This means that right now you can bisect from about 2016.07 22:47
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129781
AlexDaniel bisectable6: old=2016.07 new=HEAD my @a; @a.splice(0, 0, 42)
bisectable6 AlexDaniel, Bisecting by exit code (old=2016.07 new=62d8382). Old exit code: 1
AlexDaniel, bisect log: gist.github.com/388317c5f94f266ad2...1c2decc664
AlexDaniel, (2016-07-28) github.com/rakudo/rakudo/commit/cc...7ab1b68e57
AlexDaniel bisectable6: old=2016.06 new=HEAD my @a; @a.splice(0, 0, 42) 22:48
bisectable6 AlexDaniel, No build for revision “2016.06”
AlexDaniel ;) :(