Closed gitonthescene closed 2 years ago
FWIW, this also feels like a memory error to me.
I ran git bisect on these changes and the last output that matches the good output from 2019-01-17 is the following:
$ git bisect good; make; ./k bug.k
4466f8671dac81d7773cc95764741bcae4df6667 is the first bad commit
commit 4466f8671dac81d7773cc95764741bcae4df6667
Author: tavmem <tavmem@gmail.com>
Date: Thu Apr 4 21:04:21 2019 -0400
adjustments to sd() ... show details
src/k.c | 2 +-
src/kx.c | 20 ++++++++------------
2 files changed, 9 insertions(+), 13 deletions(-)
make: Nothing to be done for `all'.
kona \ for help. \\ to exit.
((0 3 9 7 6 6 6 8 6 6
0 7 4 9 7 6 6 9 1 8
0 0 5 3 9 7 6 9 3 3
0 0 0 4 2 9 7 8 2 2
0 0 0 4 2 2 9 8 9 2
0 0 5 3 2 2 2 8 7 7
0 5 3 2 2 2 2 9 6 6
9 3 2 2 2 2 8 9 6 6
7 9 2 2 2 8 6 8 6 6
6 7 8 9 9 9 8 7 6 6)
1656
100)
((0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0)
3125
195)
$
It looks like the output changed at this rev, but it's not necessarily wrong at that rev. Also the error at HEAD with the attached script is a 'type
error. When I bisect, I run into a 'wsfull
and a `'value' error along the way. If I accept the changed output mentioned above, the first error comes at the following:
$ git bisect good; make; ./k bug.k
1f02a068912106f8f1f8cc14e0914aceb911877e is the first bad commit
commit 1f02a068912106f8f1f8cc14e0914aceb911877e
Author: Tom Szczesny <tom@new-host-2.home>
Date: Wed May 15 16:19:57 2019 -0400
pass dict by value
src/kx.c | 2 +-
src/kx.h | 2 +-
src/p.c | 26 +++++++++++++-------------
src/p.h | 4 ++--
src/v.c | 2 +-
src/v.h | 2 +-
6 files changed, 19 insertions(+), 19 deletions(-)
make: Nothing to be done for `all'.
kona \ for help. \\ to exit.
[(0 3 9 7 6 6 6 8 6 6
0 7 4 9 7 6 6 9 1 8
0 0 5 3 9 7 6 9 3 3
0 0 0 4 2 9 7 8 2 2
0 0 0 4 2 2 9 8 9 2
0 0 5 3 2 2 2 8 7 7
0 5 3 2 2 2 2 9 6 6
9 3 2 2 2 2 8 9 6 6
7 9 2 2 2 8 6 8 6 6
6 7 8 9 9 9 8 7 6 6);1656;100]
[(0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0);3125;195]
$
I've attached the file I used to bisect. (suffix changed) bug.k.txt
More working on AoC problems. I'm sorry that I haven't narrowed this down yet, but I thought it best to post first and ask questions later. Here's the code:
The function
st
runs just fine the first time but doesn't the second:Attempting to investigate, the problem disappears:
My gut says this is something to do with the local variables getting reused on each iteration rather than starting fresh, but that's just a complete guess. In any event having output is having an effect it shouldn't.