kerf1 icon indicating copy to clipboard operation
kerf1 copied to clipboard

emu.c: memory leak in the works

Open ghost opened this issue 2 years ago • 0 comments

When kerf is in debug mode, an error is generated:

# ./kerf_test -q
Testing case   0...
Testing case 100...
Testing case 200...
Testing case 300...
Testing case 400...
Testing case 500...
Test pass rate: 1.0000, Total: 554, Pass: 553, Skip: 1, Fail: 0, Time: 0.575859s
Passed
KeRF> 
KeRF> n:20
  20

KeRF> t: {{a: range(n), b: rand(n, 100.0), c: rand(n, 6)}}

┌─┬───────┬─┐
│a│b      │c│
├─┼───────┼─┤
│0│16.4771│4│
│1│27.3974│5│
│2│28.3558│4│
│3│12.2126│2│
│4│45.1148│2│
│5│81.5326│0│
│6│ 95.726│5│
│7│38.1769│2│
│⋮│      ⋮│⋮│
└─┴───────┴─┘

KeRF> select * from t where b > 50, c = 1
[DEBUG] emu.c:674: Workspace mismatch
[DEBUG] emu.c:675: ((I)(m->function_workspace_height))=2
LINK[140356253791296, 140356254342912, 140356254346240]
"select * from t where b > 50, c = 1"
{[]select * from t where b > 50, c = 1}

┌─┬───────┬─┐
│a│b      │c│
├─┼───────┼─┤
│0│16.4771│4│
│1│27.3974│5│
│2│28.3558│4│
│3│12.2126│2│
│4│45.1148│2│
│5│81.5326│0│
│6│ 95.726│5│
│7│38.1769│2│
│⋮│      ⋮│⋮│
└─┴───────┴─┘
Assertion failed: m->workspace->n == m->function_workspace_height (emu.c: function_close: 679)
Aborted

ghost avatar Jan 12 '23 01:01 ghost