Camelia, the Perl 6 bug

IRC log for #moarvm, 2013-10-09

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:15 benabik joined #moarvm
01:22 jnap joined #moarvm
03:05 JimmyZ .tell not_gerd with --shared I got "./libmoar.so: undefined reference to `CPU_COUNT'"
03:05 yoleaux JimmyZ: I'll pass your message to not_gerd.
03:07 ggoebel5 joined #moarvm
03:13 d4l3k_ joined #moarvm
03:17 larks_ joined #moarvm
03:27 eternaleye joined #moarvm
03:42 JimmyZ FYI: the error of 'moar nqp.moarvm repl' you got is that because I don't know how to tell tty in libuv :(
06:18 diakopter not_gerd: ping
06:20 jnthn joined #moarvm
06:29 not_gerd joined #moarvm
06:29 not_gerd o/
06:29 yoleaux 8 Oct 2013 22:27Z <diakopter> not_gerd: I saw this, which led me to notice that TCC is almost done switching its license from lgpl to mit-style...! easy assembler! http://blogs.perl.org/users/david_m​ertens/2013/08/ctinycompiler-a-just​-in-time-c-compiler-for-perl.html
06:29 yoleaux 03:05Z <JimmyZ> not_gerd: with --shared I got "./libmoar.so: undefined reference to `CPU_COUNT'"
06:29 not_gerd JimmyZ: os/compiler? does it only happen with --shared?
06:30 not_gerd diakopter: pong
06:34 JimmyZ not_gerd: on linux, gcc
06:34 JimmyZ not_gerd: yes
06:35 not_gerd JimmyZ: the glibc version check is wrong, but I dont think that's it
06:38 dalek MoarVM: 9d142ab | (Gerhard R)++ | src/platform/posix/sys.c:
06:38 dalek MoarVM: Make glibc version check forward compatible
06:38 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/9d142abe00
06:39 not_gerd that probably won't help
06:45 JimmyZ yeah, same eror
06:47 not_gerd workaround would be to add http://www.redhat.com/archives/lib​vir-list/2012-August/msg01515.html to platform/posix/sys.c right before MVM_platform_cpu_count()
06:47 not_gerd that shouldn't be necessary, though
06:51 not_gerd JimmyZ: could you add https://gist.github.com/gerdr/2999fc4d064e3f637cbd before MVM_platform_cpu_count() and see if it gets triggered on both static or shared builds or just the shared one?
06:53 JimmyZ it gets triigered on both
06:55 not_gerd that makes ense, at least
06:55 not_gerd *sense
07:00 not_gerd the question is, did I mess up or is your glibc broken?
07:00 not_gerd according to the man pages, the code should work, imo
07:01 JimmyZ # uname -a
07:01 JimmyZ Linux li618-176 3.9.3-x86_64-linode33
07:01 JimmyZ # cat /etc/issue
07:01 JimmyZ CentOS release 6.2 (Final)
07:01 FROGGS joined #moarvm
07:02 JimmyZ gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
07:04 JimmyZ ldd (GNU libc) 2.12
07:04 FROGGS hi
07:04 not_gerd JimmyZ: that's the important part
07:04 not_gerd anything >= 2.6 *should* work
07:06 not_gerd FROGGS: good morning
07:06 JimmyZ weird, then why MVM_platform_cpu_count is compiled
07:07 not_gerd because it just assumes CPU_COUNT is a function with default signature
07:07 not_gerd that's only an error since C99
07:08 not_gerd in the static case, the linker is smart enough to figure out the code never gets called and thus doesn't fail on the undefined symbol
07:09 JimmyZ not_gerd: since libc < 2.6, the MVM_platform_cpu_count with CPU_COUNT function should not be compiled, I think
07:10 JimmyZ not_gerd: as per #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 6)
07:11 FROGGS that doesn't make much sense
07:11 FROGGS it would be true for __GLIBC__ > 2 already
07:11 FROGGS err, no
07:11 FROGGS nvm
07:12 FROGGS (I've seen a >= there)
07:28 FROGGS nqp-m: say("baaabbbb" ~~ /a**4..4/)
07:28 camelia nqp-moarvm: OUTPUT«aaa␤»
07:28 FROGGS :o(
07:29 FROGGS nqp-m: say("baaabbbb" ~~ /a**4..5/)
07:29 camelia nqp-moarvm: OUTPUT«aaa␤»
07:29 timotimo nqp: say("baaabbbb" ~~ /a**4..5/)
07:29 camelia nqp: OUTPUT«␤»
07:29 timotimo yeah, that's not quite perfect
07:30 FROGGS timotimo: btw, I know why the 2..4 failed, I made the return value of index(n)at -1 for not found and -2 for `offset outside of string`
07:30 FROGGS and this return value seems to be used, not only for checking if it is >= 0
07:31 timotimo oops
07:31 timotimo yeah, seems like most of these negative values have some kind of meaning
07:31 timotimo it should have been -3 instead?
07:32 FROGGS do you think so? I've seen the -3 some time ago..
07:32 FROGGS I'll grep for it in vm/parrot
07:36 FROGGS hmmmm, a failed cursor gets the -3, I don't think that I am there yet
07:43 not_gerd oh...
07:43 not_gerd I now why CPU_COUNT can't be found
07:43 not_gerd _GNU_SOURCE must be defined before including any GNU headers
07:43 not_gerd and moar.h pulls in some of those
07:45 timotimo FROGGS: does it fix the match tests?
07:46 FROGGS still compiled
07:46 FROGGS compiles*
07:47 FROGGS damn, 2**4 fails now again
07:48 dalek MoarVM: 386c0f7 | (Gerhard R)++ | src/platform/posix/sys.c:
07:48 dalek MoarVM: Move definition of _GNU_SOURCE before inclusion of any libc headers
07:48 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/386c0f7381
07:48 not_gerd JimmyZ: ^^
07:49 timotimo bleh :(
07:54 JimmyZ not_gerd++ # it fixed!
08:08 woolfy joined #moarvm
08:13 not_gerd bye, #moarvm
08:13 not_gerd left #moarvm
08:14 JimmyZ bye, not_gerd
08:23 woolfy left #moarvm
09:01 donaldh joined #moarvm
09:05 dalek MoarVM: 268332b | (Tobias Leich)++ | / (8 files):
09:05 dalek MoarVM: fix negated enumcharlist evaluation
09:05 dalek MoarVM:
09:05 dalek MoarVM: We got false positives when the to be checked offset was out of bounds.
09:05 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/268332bf85
09:06 timotimo FROGGS: fixes everything? :)
09:08 JimmyZ Is it finished?
09:09 FROGGS no, look at #perl
09:09 FROGGS I just commited what is working, so it uncovers the actual problems
09:13 FROGGS .tell diakopter the indexnat op is now in master/moarboot, if you want to uncover the gc-bug just strip the "# heisenbug!!!" comments
09:13 yoleaux FROGGS: I'll pass your message to diakopter.
09:14 FROGGS .tell jnthn the indexnat op is now in master/moarboot, if you want to uncover the gc-bug just strip the "# heisenbug!!!" comments
09:14 yoleaux FROGGS: I'll pass your message to jnthn.
09:14 FROGGS I hope that my stage0 does not break something, it works on my box at least
09:45 grondilu joined #moarvm
10:17 woosley joined #moarvm
10:30 FROGGS joined #moarvm
11:06 ggoebel6 joined #moarvm
11:25 FROGGS joined #moarvm
12:55 lizmat joined #moarvm
12:57 benabik joined #moarvm
13:51 not_gerd joined #moarvm
13:51 not_gerd o/
13:52 jnthn o/
13:52 not_gerd jnthn: I converted my ramblings re extop operand staging into code
13:52 not_gerd usage would look like https://gist.github.com/gerdr/05a30cde96d007e60b66
13:53 not_gerd dispatch is at https://github.com/MoarVM/MoarVM/blo​b/ext-stage/src/core/interp.c#L3550
13:53 not_gerd macro definitions at https://github.com/MoarVM/MoarVM/bl​ob/ext-stage/src/core/interp.c#L29
14:20 diakopter not_gerd: did you see the msg about TCC license?
14:20 not_gerd diakopter: yes
14:20 * not_gerd actually reads tinycc-devel from time to time
14:21 diakopter I think using its assemblers (one way or another) would be a very nice first attempt for the jit
14:27 not_gerd or QEMU's TCG, which IIRC is also based on the TCC assembler
14:27 not_gerd they diverged since then
14:28 diakopter well, as long as qemu's tcg is also mit license
14:29 not_gerd "All the files in this directory and subdirectories are released under a BSD like license (see header in each file). No other license is accepted."
14:29 diakopter cool :)
14:43 benabik joined #moarvm
14:45 TimToady "No other license is accepted."  What in the world does that mean?
14:45 diakopter for contributions
14:45 jnap joined #moarvm
14:47 diakopter I assume
14:48 TimToady could be
15:14 JimmyZ hmm, Does tinycc have optimize.c? I saw there is one in tcg
15:19 benabik joined #moarvm
15:20 jnap joined #moarvm
15:26 JimmyZ not_gerd: tcg looks like  really better than tinycc's one
15:27 JimmyZ much clearer api
15:31 diakopter JimmyZ: can you get at the AST creation through tcg or does it not expose that?
15:31 jnap joined #moarvm
15:35 not_gerd floating point ops are apparently still not supported :(
15:35 not_gerd I hoped someone would have taken care of that till now...
15:36 JimmyZ not_gerd: I saw it in TODO though
15:37 JimmyZ diakopter: AST creation?
15:39 diakopter JimmyZ: or operations lists?
15:39 diakopter JimmyZ: what's its interface to emit instructions?
15:39 not_gerd diakopter: http://wiki.qemu.org/Docum​entation/TCG/frontend-ops
15:40 jnap joined #moarvm
15:41 JimmyZ I saw tci use TCGContext *s
15:42 JimmyZ hmm, it's an Interpreter
15:43 not_gerd JimmyZ: there's both, I think
15:43 * not_gerd is afk
15:46 JimmyZ oh, the Interpreter is tci.c
15:46 jnap joined #moarvm
15:51 jnap joined #moarvm
15:53 JimmyZ anyway, I like it
15:58 jnap joined #moarvm
15:59 diakopter at least 95% of the potential optimum gains from optimization will be above the assembler level, so I'm not worried about squeezing the last 5% of performance [average] for years...
16:00 TimToady but we have to compete with hand-coded assembly...oh wait, that was Fortran...
16:00 TimToady we just have to compete with C
16:05 jnap joined #moarvm
16:11 jnap joined #moarvm
16:19 * jnthn finally has a build environment and a Moar build on his new lapotp :)
16:21 jnap joined #moarvm
16:26 jnthn so...this # heisenbug!!! comment...
16:27 jnap1 joined #moarvm
16:27 jnthn Removing the one in qregex makes no difference for me
16:29 jnthn nqp-m: /xa**0/
16:29 camelia nqp-moarvm: OUTPUT«Frame has unresolved labels␤   at nqp-src/QASTMoar.nqp:7955  (./QASTMoar.moarvm:assemble_and_load:15)␤ from nqp-src/NQPHLL.nqp:914  (./NQPHLLMoar.moarvm:mbc:70)␤ from nqp-src/NQPHLL.nqp:1322  (./NQPHLLMoar.moarvm:frame_name_779:87)␤ from nqp-src/NQPHLL.nqp…»
16:29 jnthn That's not heisen... :)
16:29 jnthn nqp-m: /a**0/
16:29 camelia nqp-moarvm: OUTPUT«Frame has unresolved labels␤   at nqp-src/QASTMoar.nqp:7955  (./QASTMoar.moarvm:assemble_and_load:15)␤ from nqp-src/NQPHLL.nqp:914  (./NQPHLLMoar.moarvm:mbc:70)␤ from nqp-src/NQPHLL.nqp:1322  (./NQPHLLMoar.moarvm:frame_name_779:87)␤ from nqp-src/NQPHLL.nqp…»
16:29 jnthn nqp-m: /a**1/
16:29 camelia nqp-moarvm: ( no output )
16:30 jnthn nqp-j: /a**0/
16:30 jnthn nqp: /a**0/
16:30 camelia nqp: ( no output )
16:30 jnthn nqp-jvm: /a**0/
16:30 camelia nqp-jvm: ( no output )
16:32 jnthn ah, I see it...
16:32 jnap joined #moarvm
16:33 diakopter jnap: you have to remove them all I think
16:33 diakopter r
16:33 diakopter er
16:33 diakopter jnthn: you have to remove them all I think
16:34 diakopter jnap: sry
16:35 diakopter commutastrarinessificationily
16:35 diakopter &
16:35 jnthn ah, k
16:36 diakopter well, that wouldn't make sense
16:37 diakopter try superdupercleaning
16:37 diakopter &
16:37 jnap joined #moarvm
16:46 jnap joined #moarvm
16:46 jnthn Darn, no, even removing them all doesn't help
16:47 jnthn .ask FROGGS what platform do you see the heisenbugs on?
16:47 yoleaux jnthn: I'll pass your message to FROGGS.
16:47 jnthn timotimo: Do you have the heisenbug also? If so, what platform?
16:51 ssutch joined #moarvm
16:52 jnthn t/qregex and t/p5regex now seem to hit the exact same issue
16:54 jnap joined #moarvm
17:05 jnap joined #moarvm
17:06 dalek MoarVM: d5bb4e0 | jonathan++ | src/strings/ops.c:
17:06 dalek MoarVM: iscclass should bounds check, not blow up.
17:06 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/d5bb4e0cd8
17:10 jnap joined #moarvm
17:14 jnthn nqp-m: say(nqp::isnull($*STOPPER))
17:14 camelia nqp-moarvm: OUTPUT«0␤»
17:14 jnthn nqp-jvm: say(nqp::isnull($*STOPPER))
17:14 camelia nqp-jvm: OUTPUT«0␤»
17:15 jnthn nqp-jvm: sub x(str $y) { }; x($*STOPPER)
17:15 camelia nqp-jvm: OUTPUT«Cannot unbox a type object␤  in x (/tmp/zEa7wrj3y6)␤  in  (/tmp/zEa7wrj3y6:1)␤  in  (src/stage2/gen/NQPHLL.nqp:1098)␤  in eval (src/stage2/gen/NQPHLL.nqp:1084)␤  in evalfiles (src/stage2/gen/NQPHLL.nqp:1290)␤  in command_eval (src/stage2/gen/NQPHLL.nqp:11…»
17:15 jnthn nqp-m: sub x(str $y) { }; x($*STOPPER)
17:15 camelia nqp-moarvm: OUTPUT«At Frame 1, Instruction 1, op 'param_rp_o', operand 0, MAST::Local of wrong type (7) specified; expected 8␤   at nqp-src/QASTMoar.nqp:7955  (./QASTMoar.moarvm:assemble_and_load:15)␤ from nqp-src/NQPHLL.nqp:914  (./NQPHLLMoar.moarvm:mbc:70)␤ from nqp-src/NQPH…»
17:15 jnthn hm, I think nqp-m is from before that fix... :)
17:16 jnap joined #moarvm
17:24 jnap joined #moarvm
17:28 diakopter erm, *grumble*
17:29 jnthn ok, t/qregex and t/p5regex now both run to completion here
17:29 jnthn t/qregex fails 1 test, t/p5regex fails 4.
17:30 jnthn (meaning they pass 743 and 176 respectively, which ain't at all bad)
17:30 jnthn uh, 747 I meant
17:31 diakopter *grumble* at errors. we're not supposed to have errors.
17:31 diakopter JimmyZ: or not_gerd: how does tgc opset compare to llir's
17:33 jnap joined #moarvm
17:34 diakopter do we have a --gen-moar option to ConfigureMoar.pl ?
17:34 jnthn not yet
17:34 jnthn Leaving that as an LHF :)
17:34 diakopter ARGH
17:35 diakopter that's what I was going to see if moritz wanted to do
17:35 diakopter moritz: ^ :D
17:37 diakopter .ask JimmyZ how hard woudld it be to add uint_ptr-sized atomic loads/stores to TCG?
17:37 yoleaux diakopter: I'll pass your message to JimmyZ.
17:37 diakopter .ask not_gerd how hard woudld it be to add uint_ptr-sized atomic loads/stores to TCG?
17:37 yoleaux diakopter: I'll pass your message to not_gerd.
17:37 jnap joined #moarvm
17:44 jnap joined #moarvm
17:51 jnap joined #moarvm
17:55 jnap joined #moarvm
17:59 moritz diakopter: I might, though no estimations on when
18:03 jnap joined #moarvm
18:06 not_gerd joined #moarvm
18:07 diakopter not_gerd: hi
18:08 diakopter (where by atomic loads/stores, I also mean ones that inject fences where necessary)
18:13 jnap joined #moarvm
18:13 diakopter jnthn: I'm still kindof... flabbergasted that the whole regex compiler essentially worked [modulo a few hours of you debugging] without any testing at all while being written
18:13 diakopter especially the jumplist generation
18:14 diakopter *boggle*
18:14 diakopter I've still never actually seen any regex-generated code in moarvm --dump
18:14 diakopter now I'm curious....
18:15 diakopter JimmyZ: would you like to debug what is breaking moar --dump nqp.moarvm
18:23 jnap joined #moarvm
18:27 jnap joined #moarvm
18:36 jnap joined #moarvm
19:02 jnap joined #moarvm
19:06 jnap joined #moarvm
19:07 lizmat joined #moarvm
19:14 jnap joined #moarvm
19:23 jnap joined #moarvm
19:29 jnap joined #moarvm
19:39 jnap joined #moarvm
19:44 jnap joined #moarvm
19:49 jnap joined #moarvm
19:53 jnap joined #moarvm
20:41 dalek MoarVM: 1f3f004 | jonathan++ | src/core/args.c:
20:41 dalek MoarVM: Only free args buffer if we already flattened.
20:41 dalek MoarVM:
20:41 dalek MoarVM: Otherwise, we're calling free on something inside a register frame.
20:41 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/1f3f004b0d
20:41 dalek MoarVM: 8d853d3 | jonathan++ | src/ (6 files):
20:41 dalek MoarVM: Make exceptions thrown from C catchable.
20:42 dalek MoarVM:
20:42 dalek MoarVM: Previously, they always would panic and exit the VM. Now they can be
20:42 dalek MoarVM: caught.
20:42 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/8d853d321f
20:49 diakopter jnthn: I swear 1f3f004 was already that way ... at least how I did it
20:49 diakopter or.. maybe in some branch :(
20:49 diakopter well anyway those two should use MVM_checked_free_null
20:49 diakopter er maybe I did that in the gcorch branch
20:49 diakopter argh
20:52 jnthn diakopter: MVM_checked_free_null is actually harder for me to read than pattern-matching what it does, fwiw :)
20:52 diakopter eh?
20:54 diakopter harder to read in its definition?
20:56 not_gerd joined #moarvm
20:56 not_gerd o/
20:56 yoleaux 17:37Z <diakopter> not_gerd: how hard woudld it be to add uint_ptr-sized atomic loads/stores to TCG?
20:56 jnthn diakopter: No, it's just that I'm so used to reading the 3 lines I read them as one chunk, whereas with this I actually have to read the function name :P
20:56 diakopter oh, heh.
20:56 diakopter I mean, oh
20:57 not_gerd jnthn: note that making adhoc exception catchable means we should also figure out a way to avoid leaking the memory for C strings we allocate for the error message
20:58 not_gerd or does the code already do that?
20:58 * not_gerd goes reading the diff
21:00 diakopter not_gerd: I had a plan for how to do that
21:00 diakopter I was going to pass a list of pointers to free with the exception
21:01 not_gerd or we could parse the format string ourselves, looking for %s
21:01 not_gerd which of course means bad things will happen if you pass a non-allocated string
21:01 not_gerd so probably not an option
21:03 jnthn not_gerd: Yeah, we'll leak at the moment
21:03 jnthn not_gerd: Needs addressing, but better than not being able to catch them at all :)
21:06 diakopter jnthn: you didn't like my plan?
21:06 jnthn diakopter: I think I prefer it to parsing the format string ;)
21:07 jnthn s/think/know/ :D
21:08 diakopter { ptr1, ptr2, ptr3, 0xB0054ED5 }
21:09 jnthn wtf are boo saeds?
21:10 not_gerd parsing the format string would be doable - va_copy the va_list and make sure we strdup() any strings we pass in
21:10 not_gerd +1 for doing something else, though ;)
21:10 diakopter also doable is simply pushing the pointers to a list on the threadcontext
21:11 diakopter SIMPLY SIMPLY SIMPLY
21:11 not_gerd MVM_string_utf8_encode_C_exception_string()
21:12 diakopter where's TimToady to gently tell not_gerd to stop perseverating
21:12 jnthn MVM_longest_function_name_ever :P
21:13 jnthn btw, we're down to 11 failing tests now
21:13 not_gerd \o/
21:13 jnthn thta's tests, not tst files, to be clear
21:13 jnthn uh, wow, that was clear :P
21:15 not_gerd jnthn: should I look into how to emit the extop bytecode, or will you do that?
21:15 not_gerd (ie how to get the relevant information to mast/compiler.c)
21:15 diakopter jnthn: does the exception builder need to empty the temp roots?
21:16 jnthn diakopter: "exception builder"?
21:17 diakopter not_gerd: that wasn't clear from the design doc?
21:17 diakopter jnthn: the thing you just committed
21:17 jnthn diakopter: Yes, because we might throw from within a MVM_ROOT(tc, ...)
21:17 diakopter jnthn: oh. :) you did it.
21:17 diakopter yea I didn't see that you did it
21:17 jnthn oh, I thought you were asking if we really needed to ;)
21:18 diakopter (diakopter-helpfulness)--
21:18 diakopter not_gerd: I bet you can figure it out
21:18 diakopter ask me if you have a question
21:18 not_gerd diakopter: I'm pretty sure I can
21:18 not_gerd but I woud need to figure it out
21:19 diakopter just throw it in there somewhere :)
21:23 diakopter jnthn: how's the bootstrapping gonna keep the bytecode versions straight
21:24 jnthn diakopter: bytecode file has a version number
21:24 diakopter I know this.
21:24 jnthn diakopter: We always have to support at least one version back.
21:24 jnthn I'm not planning to close the loop for a little time yet, though.
21:24 jnthn So we can have ourselves a little freedom from that for a bit longer :)
21:24 diakopter so how shoudl not_gerd add in the new things to the bytecode format
21:25 jnthn Just Do It right now.
21:25 jnthn And then use nqp-cc to make a new stage0
21:25 jnthn And commit it to the nqp repo
21:25 jnthn In the future, adding new things will need a mechanism like the serialization stuff does
21:25 jnthn So you can do stuff conditionally on version.
21:25 diakopter why not just have a clone of an old checkout under nqp-cc
21:26 diakopter or something
21:26 jnthn nqp-cc will go away in a month or so
21:26 jnthn But I think we need a little more time to make bytecode format changes more easily.
21:26 jnthn Get the op numbering as we want it, make sure sizes of things are as we want, etc.
21:27 jnthn Longer term, I'd like us to continue supporting some time period worth of bytecode versions back.
21:27 diakopter how?
21:28 jnthn Same way we do with serialization versioning
21:28 diakopter how does it do that?
21:28 jnthn if (reader->version > 4) ...we have this thing... else ...some sane defualt if needed...;
21:28 jnthn uh, >= normally
21:29 diakopter oh,
21:29 jnthn Nothing more clever than that. It's been Good Enough. :)
21:52 not_gerd good night o/
21:54 not_gerd left #moarvm
22:11 ssutch joined #moarvm
22:26 jnthn sleep &
22:27 diakopter o/
23:23 cognominal joined #moarvm

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary