This was a bug in memoization (M.). A memory block was freed twice. I
have fixed it.
The error might be a longstanding problem - I'm not sure. In 32-bit
J6.02 the sentence executes but gives a different result (one that is
smaller than 50 f 167, so I think the J6.02 result is wrong).
Or, I may have messed something up in my changing things.
The error manifests with many different symptoms, so I cross my fingers
that this fixes them all.
The fix will be released after it goes through the Release Process.
Henry Rich
On 1/2/2017 4:37 PM, Mark Allen wrote:
I'm running j64-805 on a Mid 2012 MacBook Air with 8GB RAM.
I have a script that causes jqt to crash. The script implements the F(m,n)
function as described in here: https://projecteuler.net/problem=115 and is
as follows:
params =: ( <:@:i.@:(] - <:@:[))
coeffs =: (|.@:>:@:i.@(] - <:@:[))
f =: 4 : 0 M.
if. y < x do. 1
else. >: +/ ((x coeffs y) * x f"0 (x params y))
end.
)
It generates most answers correctly, however for certain larger inputs it
causes jqt to crash. It crashes after less than a second, i.e.it doesn't
churn for a long time, and the highest entries that don't fail execute very
rapidly. Furthermore it doesn't consistently fail on the same inputs, for
instance, it has always failed on 50 f 168, but has occasionally crashed on
some lower inputs. I've tried running the script in jconsole to get some
more information, and I get two different error messages:
load 'fill.ijs'
50 f 168
jconsole(941,0x7fff7cc9f000) malloc: *** error for object 0x102005e00:
pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Showing that the error isn't necessarily the same each time:
load 'fill.ijs'
50 f 168
Segmentation fault: 11
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Any ideas on what's going on? Is there anyway to complete the computation
without encountering these errors?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm