Teaching Rakudo the tricks of Perl 5's regex optimiser

2019-08-13 Thread Nicholas Clark
re2 library (which came out of code search) could return the longest fixed string (if any) as part of its API, but I can't find that now. In https://swtch.com/~rsc/regexp/regexp4.html it mentions building trigrams (directly) from parsing the regex (with ANDs and ORs) which is what some $ork code

Re: [perl #130951] [BUG] EVAL thread safety

2017-03-08 Thread Nicholas Clark
bsanitizer/asan/asan_malloc_linux.cc:93 __interceptor_realloc ==8139==ABORTING Nicholas Clark

Re: [perl #130723] [BUG] .pick on large ranges gives unexpected results on Windows only

2017-02-06 Thread Nicholas Clark
systems return 31 bit values. ANSI C only mandates 15 bit as a minimum. If so, this third-party code is buggy. But if that's true, why on Earth has no-one else hit this before? Nicholas Clark

Re: [perl #130358] [WINDOWS] Spectest Triggers Firewall "Security Alert"

2016-12-16 Thread Nicholas Clark
test binding to the default address (which IIRC is all interfaces), and hence can the warning be fixed by explicitly binding only to localhost? Nicholas Clark

Re: [perl #129781] [SEGV] when await()ing a bunch of "start ‘/etc/hostname’.IO ~~ :e"

2016-10-01 Thread Nicholas Clark
core/interp.c:3964 #4 0x7fb46ccf5bf4 in MVM_vm_run_file src/moar.c:304 #5 0x401a4f in main src/main.c:191 #6 0x7fb46c20bd1c in __libc_start_main (/lib64/libc.so.6+0x1ed1c) SUMMARY: AddressSanitizer: double-free ../../.././libsanitizer/asan/asan_malloc_linux.cc:62 __interceptor_free ==9674==ABORTING Nicholas Clark

Re: unicode

2016-09-17 Thread Nicholas Clark
ter this month's release (to give a whole month to iron out any instabilities or bugs). So it might be a little bit bad this month, but next month will be awesome. Allegedly :-) Nicholas Clark

Re: [perl #129120] [CONC] in await: Cannot invoke this object (REPR: Null; VMNull)

2016-08-31 Thread Nicholas Clark
nnot invoke this object (REPR: Null; VMNull) in block at 129120.pl line 9 Line 9 is `print await @results;` What do I need to do better, to get actual useful details? Nicholas Clark

Re: [perl #102994] State variables are never initialized if the first call of the containing block does not reach them

2016-08-19 Thread Nicholas Clark
<$> const(IV 1) s a <2> eq sK/2 b <|> and(other->c) vK/1 c <0> pushmark s d <@> return K e <;> nextstate(main 48 -e:1) v:%,{,2048 f <|> once(other->g)[$h:48,49] vK/1 g <$> const(IV 42) s h <0> padsv[$h:48,49] sRM*/LVINTRO,STATE i <2> sassign KS/2 goto j o <0> padsv[$h:48,49] sRM*/STATE j <;> nextstate(main 49 -e:1) v:%,{,2048 k <0> pushmark s l <0> padsv[$h:48,49] l m <@> say sK n <1> leavesub[1 ref] K/REFC,1 -e syntax OK Nicholas Clark

Re: [perl #128870] [SEGV] Pushing into the same array from two threads segfaults reliably

2016-08-08 Thread Nicholas Clark
ain (/lib64/libc.so.6+0x1ed1c) SUMMARY: AddressSanitizer: double-free ../../.././libsanitizer/asan/asan_malloc_linux.cc:93 __interceptor_realloc ==25229==ABORTING Nicholas Clark

Re: [perl #128831] t/spec/S16-io/eof.t is unportably assuming that /proc/1/comm exists

2016-08-03 Thread Nicholas Clark via RT
On Wed, Aug 03, 2016 at 03:15:49PM -0400, Brandon Allbery wrote: > On Wed, Aug 3, 2016 at 3:12 PM, Nicholas Clark > wrote: > > > I don't know what file would be safer. Maybe mem? > > > None of them. There's no guarantee that /proc exists (non-SVR4 commercial &

Re: [perl #128831] t/spec/S16-io/eof.t is unportably assuming that /proc/1/comm exists

2016-08-03 Thread Nicholas Clark
On Wed, Aug 03, 2016 at 03:15:49PM -0400, Brandon Allbery wrote: > On Wed, Aug 3, 2016 at 3:12 PM, Nicholas Clark > wrote: > > > I don't know what file would be safer. Maybe mem? > > > None of them. There's no guarantee that /proc exists (non-SVR4 commercial &

Re: [perl #128804] [LTA] error message talks about 2/-1 fractional chars (:35)

2016-08-02 Thread Nicholas Clark
t part is just Garbage In, Garbage Out, and a distraction from the true cause) Nicholas Clark

Re: [perl #128705] Segfault on unicode string handling

2016-07-23 Thread Nicholas Clark
/moar-san/bin/moar+0x401058) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV src/core/interp.c:2859 MVM_interp_run ==20272==ABORTING Looks like "just" a direct NULL pointer dereference, not the fallout from earlier more subtle undefined behaviour. Nicholas Clark

Re: [perl #128516] [SEGV] $!attr.^compose causing segfault

2016-07-05 Thread Nicholas Clark
.c:245: MVM_gc_root_gen2_add: Assertion `!(c->flags & MVM_CF_FORWARDER_VALID)' failed. Aborted (I wasn't paying close attention, but I guess I built with full-on debugging flags) I hope that makes it more obvious to someone how to fix this. Nicholas Clark

Re: [perl #127902] [BUG] segmentation fault when defining multi sub cross

2016-04-15 Thread Nicholas Clark
f6 Poisoned by user:f7 Contiguous container OOB:fc ASan internal: fe ==10839==ABORTING [hopefully with formatting fixed] Nicholas Clark

Re: [perl #127878] UTF8-C8 + Str.subst either dumps core or corrupt memory

2016-04-11 Thread Nicholas Clark
liner changes from ASAN barfage to no output. (which means that the SEGV is fixed). That means it's now "tests needed" ? Nicholas Clark

Re: [perl #127254] Segmentation fault on recursive binding (my $x := (my $y := $x))

2016-01-13 Thread Nicholas Clark
; Segmentation fault > > > Code: > my $x := (my $y := $x); > say $x.^methods; > > Result: > Segmentation fault ASAN shows that all of these are "just" NULL pointer dereferences. No (other) undefined behaviour at the C level. Nicholas Clark

Re: [perl #127208] Non-deterministic segfaults in parallel code

2016-01-08 Thread Nicholas Clark
guous container OOB:fc ASan internal: fe ==16988==ABORTING Nicholas Clark

Re: [perl #126551] [BUG] Segfault on EXPORT returning Hash in weird circumstance

2015-11-03 Thread Nicholas Clark
On Tue, Nov 03, 2015 at 05:31:40PM +, Nicholas Clark wrote: > Not a NULL pointer dereference. A more serious bug than that. Also present with MoarVM/NQP/Rakudo at 47bb37e Include \r\n synthetic in default separators. 7710de0 Fix thinko in \r\n -> grapheme prep. 385850b Stre

Re: [perl #126551] [BUG] Segfault on EXPORT returning Hash in weird circumstance

2015-11-03 Thread Nicholas Clark
f9 Global init order: f6 Poisoned by user:f7 Contiguous container OOB:fc ASan internal: fe ==13267==ABORTING Not a NULL pointer dereference. A more serious bug than that. Thanks for reporting the bug, and thanks for reducing it down to a really small case. Nicholas Clark

Re: [perl #126490] [BUG] Control exception handling is inconsistent and broken across backends. (SEGV on moar, CX unrecognized on jvm)

2015-10-30 Thread Nicholas Clark
On Thu, Oct 29, 2015 at 07:41:06PM +, Nicholas Clark wrote: > On Thu, Oct 29, 2015 at 09:22:30AM -0700, Pepe Schwarz wrote: > > > The same code on R-M segfaults: > > > > 16:15 m: A: for 1 { for 1 { last A }; CONTROL { when CX::Last { say > > "last"

Re: [perl #126490] [BUG] Control exception handling is inconsistent and broken across backends. (SEGV on moar, CX unrecognized on jvm)

2015-10-29 Thread Nicholas Clark
n __libc_start_main (/lib64/libc.so.6+0x1ed5c) #5 0x401058 (/home/nicholas/Sandpit/moar-san/bin/moar+0x401058) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV src/strings/ops.h:30 MVM_string_graphs ==28758==ABORTING Looks like it's "just" a NULL pointer dereference. Nicholas Clark

Re: [perl #126350] [BUG] segmentation fault with precompile + add_method

2015-10-14 Thread Nicholas Clark
ere's nothing wrong happening before a NULL pointer dereference. Nicholas Clark

Re: [perl #126297] [bug] filehandle read in a thead causes a segfault when the thread ends

2015-10-10 Thread Nicholas Clark
1058) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV src/gc/roots.c:171 MVM_gc_root_add_temps_to_worklist ==17783==ABORTING Nicholas Clark

Re: [perl #125600] LTA error message when executing directories as perl6 code

2015-07-12 Thread Nicholas Clark
CopFILE(PL_curcop), +strerror(EISDIR)); + return rsfp; } I think that Rakudo should make the same check. (And I think that "not a directory" is better than some attempt to whitelist "file", er wait, "file or symlink", er wait "file, symlink or named pipe" etc) Nicholas Clark

Re: [perl #125216] [BUG] -0e0 === 0e0 in Rakudo

2015-05-20 Thread Nicholas Clark
ably it should be memory comparison on the meat, carefully avoiding the padding. Nicholas Clark

Re: rakudo Test module: expanding tests considered?

2015-03-24 Thread Nicholas Clark
est::Deep, etc. It doesn't look to me like there's a way to do that (yet) in the Perl 6 ecosystem. Am I missing a way to mix in new test functions without having to replace/redo the existing ones? Nicholas Clark

Re: [perl #124108] [BUG] reduce meta-operator fails with 'max' on list larger than 2**15 with MoarVM

2015-03-19 Thread Nicholas Clark
in.c:189) Is this something to do with P6Int having alternative storage representations? If so, it implies that some more tests would be useful for values around the switchover points. (To be robust I'd suggest testing all ranges ±2 around values 256**n for n 0 to 9) Nicholas Clark

And now PPC32 (was Re: Taming PowerPC 64)

2015-03-05 Thread Nicholas Clark
On Thu, Mar 05, 2015 at 08:41:51PM +, Nicholas Clark wrote: > On Thu, Mar 05, 2015 at 07:57:12PM +0000, Nicholas Clark wrote: > > > Sadly PPC32 is a mess. With these patches NQP will build, and the nativecall > > tests pass. However 2 other tests fail (arithmetic and pri

Re: Taming PowerPC 64

2015-03-05 Thread Nicholas Clark
On Thu, Mar 05, 2015 at 07:57:12PM +, Nicholas Clark wrote: > Sadly PPC32 is a mess. With these patches NQP will build, and the nativecall > tests pass. However 2 other tests fail (arithmetic and printf problems), and > the Rakudo build explodes with a syntax error backtrace. [

Taming PowerPC 64

2015-03-05 Thread Nicholas Clark
s it's not even worth attempting to figure out the Rakudo problem, as it might be caused by the NQP bugs. Nicholas Clark >From 14f8c73cce49fc789088d660f262eadb8e0c27c2 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Thu, 5 Mar 2015 11:13:38 -0800 Subject: [PATCH] The nativecall test for

nqp and perl6 fakecutables for MoarVM

2014-12-03 Thread Nicholas Clark
it's possible to can dump MoarVM config with the stage0 NQP - this means that we can do other stuff in a similar way. This means that a lot more dogfood possible a lot earlier than is obvious. Nicholas Clark >From 1e3fbde3562d77ba8f50d6c62d28e61c87ad6e1f Mon Sep 17 00:00:00 2001 From: Nic

Re: [perl #115566] [BUG] Variables declared in quasi blocks don't work in Rakudo

2014-10-21 Thread Nicholas Clark
ating with default action of signal 11 (SIGSEGV): dumping core ==23928== Access not within mapped region at address 0x10 ==23928==at 0x4F57A5E: MVM_interp_run (interp.c:1226) ==23928==by 0x502FBA3: MVM_vm_run_file (moar.c:208) ==23928==by 0x40110D: main (main.c:191) This is the same C backtrace as #120397, in OP(assign) Nicholas Clark

Re: [perl #120397] [BUG] Segfault (Moar, JVM) and Null PMC access (Parrot) when assigning to a variable "declared" in a subsignature in a variable declaration in Rakudo

2014-10-21 Thread Nicholas Clark
gn to an immutable value"); 1232 } 1233 goto NEXT; I can't convince gdb to "like" the various local libraries on this machine (local updated compiler toolchain, but not debugger), so I can't verify which pointer is NULL. Nicholas Clark

Re: active rakudo ports

2014-09-16 Thread Nicholas Clark
On Tue, Sep 16, 2014 at 11:10:54AM +0200, Gerd Pokorra wrote: > Hello, > > Am Dienstag, den 16.09.2014, 09:32 +0100 schrieb Nicholas Clark: > > What are the current active ports of Rakudo? > > > > I see a list in http://rakudo.org/how-to-get-rakudo/ > > > &g

active rakudo ports

2014-09-16 Thread Nicholas Clark
kudo-star/README.html Are there any OSes (or packaging systems) that are carrying Rakudo that I've missed? Nicholas Clark

Re: [perl #122725] Install libs for rakudo sorted wrong way around

2014-09-08 Thread Nicholas Clark
Agree, for the reasons that Perl 5 made this switch. In the short term, it avoids problems with "shadowing" vs needing to overwrite the master copy (which upsets inferior package managers) In the long term doing "site" first also provides a way for Star to phase out shipping superceded modules. Nicholas Clark

Hackathon at the Austrian Perl Workshop in October

2014-06-12 Thread Nicholas Clark
on freenode and ask for suggestions on how to get involved. Nicholas Clark

Re: simply re-ordering structs reduces runtime

2014-05-20 Thread Nicholas Clark
On Tue, May 20, 2014 at 07:28:06PM +0100, Nicholas Clark wrote: > For the Pi (which is swapping heavily) the results are quite noticeable. Peak swap is now 515928 (Mb) Previously it was 524996 On an run on May 10th it was 458968 My book keeping isn't perfect, so I don't know f

simply re-ordering structs reduces runtime

2014-05-20 Thread Nicholas Clark
On Sat, May 17, 2014 at 09:36:00AM +0100, Nicholas Clark wrote: > On Fri, May 16, 2014 at 10:05:36PM +0100, Nicholas Clark wrote: > > > Both the 32 and 64 bit code paths tested on x86_64 (with some editing of > > configs). Builds on real x86. The Raspberry Pi has passed all

Re: (hopefully) alignment fixes

2014-05-17 Thread Nicholas Clark
On Fri, May 16, 2014 at 10:05:36PM +0100, Nicholas Clark wrote: > Both the 32 and 64 bit code paths tested on x86_64 (with some editing of > configs). Builds on real x86. The Raspberry Pi has passed all of NQPs > tests, which means that it should work (without this it would SEGV on th

(hopefully) alignment fixes

2014-05-16 Thread Nicholas Clark
efine MVM_DIRECT_SC_IDX_SENTINEL 0xFF #else # define MVM_DIRECT_SC_IDX_SENTINEL ~0 #endif but I'm not yet in a position to benchmark it. (The 32 bit platforms are slow, and don't have as may cores at the x86_64 beasts) Nicholas Clark >From 85577a3dfcf9c95c3e59b41dc9dd6ad379fe217d Mon Sep 17

ARM status

2014-05-05 Thread Nicholas Clark
d. I'm not too worried about that currently - most folks will be using stuff from packages. eg, here's what apt gave me: This is perl6 version 2014.03.01 built on parrot 6.0.0 revision 0 Nicholas Clark >From a1ff1a2d5dd49ef25ca0e962fd026e694cbb26fc Mon Sep 17 00:00:00 2001 From: Nicholas

fixes for ARM and quite possibly Win32 too

2014-05-05 Thread Nicholas Clark
it's worth someone checking this on Windows (32 bit and 64 bit) and if it doesn't break anything that currently works, applying it. Nicholas Clark >From d57ceba5b4064846980b944943cea4d2f4b54bbc Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 4 May 2014 14:45:41 +0200 Subjec

MoarVM/Rakudo (un)bustage with unsigned chars

2014-05-05 Thread Nicholas Clark
ay, if I change the type of bytes to be MVMuint8 *, then the bug is repeatable on x86_64 with the default char (ie signed). So attached are two patches, one to remove the above buggy code, and the second to change the prototype of MVM_string_utf8_decode to take MVMuint8 *, as conceptually UTF-8 sequences a

gcc __alignof__() surprise

2014-05-04 Thread Nicholas Clark
e? Or is it giving a truthful less-than-useful answer? (Because what matters to MoarVM is the alignment of, and therefor padding needed for, structure members) Nicholas Clark

Re: static inline probing for MoarVM

2014-02-19 Thread Nicholas Clark
On Tue, Feb 18, 2014 at 12:02:50PM -0500, Andy Dougherty wrote: > On Tue, Feb 18, 2014 at 03:11:01PM +0000, Nicholas Clark wrote: > > Andy, is it OK to use your Perl 5 static inline probing code in MoarVM? > > Absolutely. Please feel free. Perl 5's Configure script is actu

Re: Convert MVM_WB to an inline function.

2014-02-19 Thread Nicholas Clark
On Tue, Feb 18, 2014 at 08:52:42PM +, Nicholas Clark wrote: > Hence the first two patches (to Rakudo and Moar) that get a pointer to the > MVMCollectable contained within every object. Which applies on its own, > without adding any compiler warnings. Fail. 2 copies of the Moar patc

Re: static inline probing for MoarVM

2014-02-18 Thread Nicholas Clark
On Tue, Feb 18, 2014 at 03:11:01PM +, Nicholas Clark wrote: > Attached is the proposed patch, which implements compiler based probing for > the MoarVM Configure.pl. Tested on OS X, FreeBSD, Linux, HP/UX and AIX. > Not tested on Win32, so might not work there without tweaks. Attac

static inline probing for MoarVM

2014-02-18 Thread Nicholas Clark
list is going to be more work than this. Nicholas Clark >From dba2746602e470cd325907b0aaedb46970ee96a6 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 18 Feb 2014 15:13:10 +0100 Subject: [PATCH 1/6] Add probing code to Configure.pm to learn how the compiler does 'static inline

varint refactor

2014-02-12 Thread Nicholas Clark
less code, and at least to my eye it's simpler too. Also attached is another test for NQP for serialisation. Feedback and other opinions welcome. Nicholas Clark >From 27820d14304fd94f47158e1de0228779e2bfea01 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 11 Feb 2014 20:52:59

Re: varint tests and fixes

2014-02-11 Thread Nicholas Clark
On Tue, Feb 11, 2014 at 04:48:29PM +, Nicholas Clark wrote: > Attached are a first stab at some tests for native integer serialisation. > They pass on the JVM, and on MoarVM (tested 64 bit and 32 bit Linux) with > patching. Specifically the two commits from the branch maybe-varin

Re: varint tests and fixes

2014-02-11 Thread Nicholas Clark
Oops, missed something On Tue, Feb 11, 2014 at 04:48:29PM +, Nicholas Clark wrote: > >From b20f8f328c6155019702cf44d27ed10a4251ac21 Mon Sep 17 00:00:00 2001 > From: Nicholas Clark > Date: Tue, 11 Feb 2014 17:40:54 +0100 > Subject: [PATCH] Fix various errors in varint ser

varint tests and fixes

2014-02-11 Thread Nicholas Clark
) (gen/parrot/stage2/NQP.nqp:3646) The problem seems to be serialising an array. Is the correct trick to make them work to refactor them to use an object with an array attribute? I don't think that fixing the tests should hold up fixing MoarVM, if the C code patch is acceptable. Nicholas C

Rough cut at shrinking the GC header

2014-02-06 Thread Nicholas Clark
nline functions: commit b575e123dfc6ab49639fec28871247b8fe8bdeab Author: Nicholas Clark Date: Wed Jan 29 21:41:26 2014 +0100 Encapsulate SC access through MVM_sc_{get,set}_{stable,obj}_sc() Ideally these would be inline functions. diff --git a/src/6model/sc.c b/src/6model/sc.c index 3

process_worklist() was doing too much work

2014-01-28 Thread Nicholas Clark
ot;torture") and the setting compilation is faster. Confirming how faster, and whether it's just the setting, is left as an exercise for the reader :-) Nicholas Clark >From ace9d7a50510a85e8c7b63a17946a9e9bf027a84 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 28 Jan

Re: P6opaque ends up serialising uninitialised memory

2014-01-28 Thread Nicholas Clark
On Mon, Jan 27, 2014 at 09:43:49PM +, Nicholas Clark wrote: > With this, core setting just produces 1 error from valgrind: > I'm not sure how to find that one. Writing everything plausible to /dev/null helped a lot, as it caused valgrind to produce an earlier backtrace: diff --

Re: P6opaque ends up serialising uninitialised memory

2014-01-27 Thread Nicholas Clark
On Mon, Jan 27, 2014 at 09:43:49PM +, Nicholas Clark wrote: > I don't think that there are that many places where this happens (but I > haven't rigged the build to count them yet), so I don't think that it's > worth adding to the C structures to remember

P6opaque ends up serialising uninitialised memory

2014-01-27 Thread Nicholas Clark
lues come from ==11990== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 9 from 9) I'm not sure how to find that one. Nicholas Clark >From 9717c39e5e74cfe145e2210342e63f183478fa14 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Mon, 27 Jan 2014 22:20:54 +0100 Subject: [PATCH] In P6

Re: MoarMV attempts to lock an already locked mutex

2014-01-09 Thread Nicholas Clark
On Thu, Jan 09, 2014 at 10:32:37PM +0100, Jonathan Worthington wrote: > Hi, > > On 1/9/2014 22:00, Nicholas Clark wrote: > > I've been running with the appended for a few weeks now, and I think that > > it's the right fix. > Unfortunately, releasing the m

Stronger assertions of sanity in the write barrier.

2014-01-09 Thread Nicholas Clark
arguments with side effects passed to "functions" that happens if the "functions" are actually macros 3) it makes it easier to debug in toolchains that don't have something like gcc's -g3 (No, I'm not volunteering myself. I'm already busy looking f

Re: MoarMV attempts to lock an already locked mutex

2014-01-09 Thread Nicholas Clark
On Sat, Dec 21, 2013 at 08:45:49PM +, Nicholas Clark wrote: > ==11811== Thread #1: Attempt to re-lock a non-recursive lock I already hold > ==11811==at 0x4C2BFC1: pthread_mutex_lock (hg_intercepts.c:484) > ==11811==by 0x4FACB40: uv_mutex_lock (thread.c:69) > ==11811==

compiling Rakudo's Test.pm - i64 being written to a register marked as obj

2013-12-30 Thread Nicholas Clark
1, as set by this code: OP(scwbdisable): GET_REG(cur_op, 0).i64 = ++tc->sc_wb_disable_depth; cur_op += 2; goto NEXT; I don't know how to debug this further. Nicholas Clark

Missing write barriers for MVM_string_find_encoding()

2013-12-28 Thread Nicholas Clark
lection? ie, should that MVM_string_find_encoding(tc, enc_name) be yanked to a line above and assigned to a local variable, so that any GC run has happened before the arguments to MVM_string_decode() start to be put onto the CPU stack for the C function call? Nicholas Clark >From b54de7c404e5bd01

Missing write barrier in MVM_sc_get_sc()

2013-12-28 Thread Nicholas Clark
oDo_All) { MVM_gc_collect_free_stables(tc); } I mail it here in case it's useful to anyone else trying to figure out missing write barriers. 2) Do most missing write barrier bugs look as crazy to figure out as this one? Or was this one particularly special by corrupti

Missing root in MVM_hll_set_config()

2013-12-28 Thread Nicholas Clark
table might be in the nursery and hence might move unless, and only unless, the code can prove that it doesn't need to? Should MoarVM API calls that can't trigger GC be explicitly documented as such? Nicholas Clark >From 1b046a7a2832171bd2e50399410396365a6634dd Mon Sep 17

Re: register pointing to fromspace

2013-12-22 Thread Nicholas Clark
On Sun, Dec 22, 2013 at 08:42:05PM +, Nicholas Clark wrote: > On Sun, Dec 22, 2013 at 01:31:35PM +0000, Nicholas Clark wrote: > > I don't know how to chase this further. I have a string that is from > > fromspace > > that is being referenced by MVM_string_equal. I t

Re: register pointing to fromspace

2013-12-22 Thread Nicholas Clark
On Sun, Dec 22, 2013 at 01:31:35PM +, Nicholas Clark wrote: > I don't know how to chase this further. I have a string that is from fromspace > that is being referenced by MVM_string_equal. I think that it has come from a > register. Output (with debugging): Following suggestions

register pointing to fromspace

2013-12-22 Thread Nicholas Clark
nt frame, hence not obvious how to iterate over them and attempt to validate them by dereferencing. Nicholas Clark >From 8e9a66570cf2048be49fe0690364222ad921c53d Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 22 Dec 2013 05:04:23 +0100 Subject: [PATCH] Release tc->instance->mu

MoarMV attempts to lock an already locked mutex

2013-12-21 Thread Nicholas Clark
recursive mutex? *) Or should MVM_sc_create be moving the mutex lock much more tightly around the manipulations of tc->instance->sc_weakhash? (But can MVM_HASH_BIND trigger a GC run? Can MVM_string_flatten?) nor do I know if similar systematic flaws exist in other mutex handling - can the GC attempt to lock any of the other mutexes? Nicholas Clark

pushing optional arguments onto the temps stack if they are missing would be a bad thing (TM)

2013-12-20 Thread Nicholas Clark
mporarily root, and encapsulates the conditional check for exists. Anyway, for now, I'm applying the attached patch locally, and continuing to test. Nicholas Clark >From e3b867213b855506682aa6a5956ac691a227479d Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Fri, 20 Dec 2013 17:47:43 +0100

Re: detecting missing roots and other GC mistakes

2013-12-18 Thread Nicholas Clark
On Tue, Dec 17, 2013 at 11:54:44PM +0100, Jonathan Worthington wrote: > On 12/15/2013 21:50, Nicholas Clark wrote: > > I don't know for sure what the right fix is. > Hopefully, 191c383 is the right fix. Confirmation welcome. :-) I can confirm that with it, the error goes away an

Re: detecting missing roots and other GC mistakes

2013-12-16 Thread Nicholas Clark
On Mon, Dec 16, 2013 at 07:58:06PM +0100, Tobias Leich wrote: > I don't think they can move... > > value_obj is only used from its assignment to before an allocation. Same > goes for base_obj. [reply below because I think that it makes more sense] > Am 15.12.2013 21:50, sc

Re: detecting missing roots and other GC mistakes

2013-12-16 Thread Nicholas Clark
On Sun, Dec 15, 2013 at 08:50:27PM +, Nicholas Clark wrote: > On Sun, Dec 15, 2013 at 05:56:40PM +0000, Nicholas Clark wrote: > > > With this, all NQP tests pass I can build the Rakudo setting, with a nursery > > size of 2048K. > > > > I have now written

Re: detecting missing roots and other GC mistakes

2013-12-15 Thread Nicholas Clark
On Sun, Dec 15, 2013 at 05:56:40PM +, Nicholas Clark wrote: > With this, all NQP tests pass I can build the Rakudo setting, with a nursery > size of 2048K. > > I have now written a script that will attempt to repeatedly recompile that > far, each time dropping the nursery si

Re: detecting missing roots and other GC mistakes

2013-12-15 Thread Nicholas Clark
On Sun, Dec 15, 2013 at 04:19:19PM +, Nicholas Clark wrote: > (Again) I don't know what the correct fix is. For now I'm working round it with this: commit d3b4bca8139a5875e6a91d14896c2167ce36e23d Author: Nicholas Clark Date: Sun Dec 15 18:31:29 2013 +0100 XXX Uncle

Re: detecting missing roots and other GC mistakes

2013-12-15 Thread Nicholas Clark
On Sun, Dec 15, 2013 at 02:30:14PM +, Nicholas Clark wrote: > I hacked up (somewhat literally) the attached 3 patches, to try to help > automate GC debugging for MoarVM. The intent is to be able to change how Next mole to whack: $ gdb --args /home/nicholas/Sandpit/moar-g/bin/moar nqp.

detecting missing roots and other GC mistakes

2013-12-15 Thread Nicholas Clark
I'm offering it here on the assumption that it will be useful to others, who will be able to fix the problems that it discovers. (Until the build is clean) Nicholas Clark >From edbb71149b3cf91cdf6c7c0a406ed39737ac7fb5 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 15 Dec

Aggregate Perl 6 activity actually higher than Perl 5 core throughout 2013

2013-10-01 Thread Nicholas Clark
month, and git is attributing to months based on commit date. So any work that was rebased and then merged will be attributed to the date of rebasing. I think that this is partly why April is relatively barren in Perl 5 land - because branch activity in April was rebased onto v5.19.0 in May before

Re: Rakudo and NQP Internals Workshop (14/15 September)

2013-08-27 Thread Nicholas Clark
On Tue, Aug 27, 2013 at 09:18:17AM -0400, Parrot Raiser wrote: > On 8/27/13, Nicholas Clark wrote: > > > > 2) Frankfurt has Apfelwein. It's often available in large jugs, from which > >you refill a small glass, traditionally with a diamond pattern on it > >

Re: Rakudo and NQP Internals Workshop (14/15 September)

2013-08-27 Thread Nicholas Clark
lly with a diamond pattern on it Generally it's more "Old Rosie" than "Aspells". So it can be a bit fun drinking it in large quantities. Nicholas Clark * In 2008 we had massive fun in Mainz (the far end of the line from the airport), trying to find a machine tha

Re: [perl #118287] Can't build rakudo on jvm - out of memory

2013-06-04 Thread Nicholas Clark
at idea on this, but "out of memory" on which step? Compiling the setting? and what platform - x86_64 (GNU) Linux? How much RAM? If you use -Xmx to set a larger heap size, does it work? Nicholas Clark

Re: fun with memory with origin/jvm-support

2013-05-18 Thread Nicholas Clark
using the branches rak-jvm-support and jvm-support that will be the problem. Also, there's an obsolete branch jvm-support in NQP. You might have that locally, just to confuse things. If you run `git remote prune origin` that should clean up. (Or git fetch --prune) Nicholas Clark

Re: fun with memory with origin/jvm-support

2013-05-18 Thread Nicholas Clark
On Sat, May 18, 2013 at 05:17:58PM +0200, Gerd Pokorra wrote: > Hello, > > how did you fix the build of NQP for the JVM? > > I have the same problem that you reported in an other email. As I said in the e-mail: > Am Freitag, den 17.05.2013, 08:28 +0100 schrieb Nicholas C

fun with memory with origin/jvm-support

2013-05-17 Thread Nicholas Clark
, with -Xmx you can configure more memory for you JVM. To be sure that you don't leak or waste memory. Take a heap dump and use the Eclipse Memory Analyzer to analyze your memory consumption. Does that sound familiar enough to someone to be tempting? Nicholas Clark

Re: Can't build NQP on the JVM any more :-(

2013-05-04 Thread Nicholas Clark
/parrot/ops/nqp.ops | 37 + 2 files changed, 39 insertions(+), 0 deletions(-) I don't know if that's useful, but I hope that it is. Nicholas Clark

Re: No more Rakudo *?

2013-05-03 Thread Nicholas Clark
ns of Perl 5 checked out from git. We've also got smoke testers running on various platforms people care about, which spots portability bugs and regressions well before release (headache) time.) This sounds like the sort of thing that new volunteers could usefully contribute to the Rakudo effort, as it doesn't have a high barrier to entry, and there's plenty of Perl 5 toolchain to steal. Nicholas Clark

Can't build NQP on the JVM any more :-(

2013-05-03 Thread Nicholas Clark
9" OpenJDK Runtime Environment (rhel-2.3.9.1.el6_4-x86_64) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) $ javac -version javac 1.7.0_19 $ uname -srvmpio Linux 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux Nicholas Clark

Re: naming the test of arrays "defined"

2013-03-21 Thread Nicholas Clark
haven't My unease comes, I think, from a Perl 5 perspective. undef/defined on an array is dealing with something associated with the container, and an implementation detail at that. undef/defined on a scalar is dealing with something associated with the value. If, as I think you are saying, Perl 6 has a much clearer idea of what is value and what is container, and defined has a clearer idea of what it is interacting with, then it's not going to get confusing for Perl 6. Nicholas Clark

Re: naming the test of arrays "defined"

2013-03-21 Thread Nicholas Clark
On Thu, Mar 21, 2013 at 04:50:40PM +, Nicholas Clark wrote: Bother. That should have been more to perl6-language than perl6-compiler. Should I resend it? Nicholas Clark

naming the test of arrays "defined"

2013-03-21 Thread Nicholas Clark
ty data (deprecation warnings turned off, script appended) ie "undefined" in scalars is a property of the value, and always passed to the assignee in assignment. whereas for arrays, not so. The shape of that table is definitely an implementation detail exposed. Nicholas Clark #!/usr/

Re: deleting delete and exist need not exist

2013-02-11 Thread Nicholas Clark
On Mon, Feb 11, 2013 at 08:11:53AM -0600, Patrick R. Michaud wrote: > On Mon, Feb 11, 2013 at 09:56:31AM +0000, Nicholas Clark wrote: > > Here are a better set of patches for Rakudo. They don't duplicate the check > > for $p < 0, and they avoid calling nqp::elems(), by

Re: deleting delete and exist need not exist

2013-02-11 Thread Nicholas Clark
atches remain fine. On Sun, Feb 10, 2013 at 09:19:22PM +0000, Nicholas Clark wrote: > I've no idea if the coding style is appropriate. Whether the indentation is > crazy. Whether one should be using Mu. etc This still holds. Style-wise, it would be possible to avoid using ret

deleting delete and exist need not exist

2013-02-10 Thread Nicholas Clark
appropriate. Whether the indentation is crazy. Whether one should be using Mu. etc But it does work :-) [Including the spectests. But why should you trust me on that? :-)] Nicholas Clark >From 2c73f49b51bf43c046e42780fefbb0d35720 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 10

Re: NQP JVM prototype faster than Perl 5

2013-02-03 Thread Nicholas Clark
On Sun, Feb 03, 2013 at 10:35:12AM +, Nicholas Clark wrote: > On Sat, Feb 02, 2013 at 06:32:10PM -0800, Matthew Wilson wrote: > > Did you mean to use $z in the say output of the nqp and perl versions of > > the microbenchmark, or did you mean to run it twice? > > I

Re: NQP JVM prototype faster than Perl 5

2013-02-03 Thread Nicholas Clark
29; my $t0 = time; my $z = fib($N); my $t1 = time; print "fib($N) = $z\n"; print "time= " . ($t1-$t0) . "\n"; $ ~/Sandpit/5162/bin/perl5.16.2 ~/test/fib.pl fib(29) = 514229 time= 0.5503830909729 Nicholas Clark

NQP JVM prototype faster than Perl 5

2013-02-02 Thread Nicholas Clark
e= 0.544455051422119 So the NQP JVM prototype is about 1.5 faster at running that code than Perl 5. That's without any sort of tuning of its code generator. That's quite impressive. Well done Jonathan. Please don't stop :-) Nicholas Clark

Re: [perl #116280] [BUG] NaN, Inf, -Inf aren't padded with spaces in sprintf in Rakudo

2013-01-09 Thread Nicholas Clark
On Wed, Jan 09, 2013 at 10:07:21AM +, Nicholas Clark wrote: > I think that the right way to go is to write sprintf, or as much of it as is > possible, in NQP. Specifically, I suspect that all the parsing of the % codes > should be done in high level language, only kicking down to

Re: [perl #116280] [BUG] NaN, Inf, -Inf aren't padded with spaces in sprintf in Rakudo

2013-01-09 Thread Nicholas Clark
) possible to optimise in ways that just can't be done via a monolithic call. For an example, see this PyPy blog entry: http://morepypy.blogspot.com/2011/08/pypy-is-faster-than-c-again-string.html Nicholas Clark

Re: tweaking the multiple dispatch code

2012-12-03 Thread Nicholas Clark
On Thu, Nov 15, 2012 at 04:13:01PM +, Nicholas Clark wrote: > Following a chat on IRC today: > > 09:28 < nwc10> I see accesses to all structure members except constraints in >the rest of the code > 09:29 < jnthn> Yeah. It could be moved into Rakudo

  1   2   3   4   5   6   7   8   9   10   >