valgrind findings

This commit is contained in:
John Kerl 2017-02-19 22:32:19 -05:00
parent 4b162d4132
commit c5ffbb1f5e
2 changed files with 3 additions and 13 deletions

View file

@ -548,6 +548,7 @@ static udf_callsite_state_t* udf_callsite_state_alloc(
pstate->args = mlr_malloc_or_die(pstate->arity * sizeof(boxed_xval_t));
for (i = 0; i < pstate->arity; i++) {
// Ownership will be transferred to local-stack which will be responsible for freeing.
pstate->args[i] = box_ephemeral_val(mv_absent());
}
@ -568,10 +569,6 @@ static void udf_callsite_state_free(udf_callsite_state_t* pstate) {
for (int i = 0; i < pstate->arity; i++) {
rxval_evaluator_t* pxev = pstate->pevals[i];
pxev->pfree_func(pxev);
// xxx dup ownership w/ localstack?
if (pstate->args[i].is_ephemeral) {
mlhmmv_xvalue_free(&pstate->args[i].xval);
}
}
free(pstate->pevals);
free(pstate->args);

View file

@ -1,17 +1,11 @@
================================================================
BUGFIXES
$ mlr --nidx --from data/english-words.txt put -q -f ngrams/ngfuncs.mlr -f ngrams/ng3.mlr
...
mlr(3541,0x7fffa963f3c0) malloc: *** error for object 0x7fe5190a0003: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
:D
================================================================
5.0.0 RELEASE TO DO:
! malloc bug @ ngrams !
* UT
* cookbook
* other doc
@ -55,7 +49,7 @@ COOKBOOK CHECKLIST:
----------------------------------------------------------------
cook 1:
(done)
begin number nr andor cat -n -- maybe as faqent?
----------------------------------------------------------------
cook 2: fun stuff:
@ -263,7 +257,6 @@ func/subr:
* cookbook examples
file-formats page:
* --c2p, --c2j etc ...
* --pprint --barred; emph for output only
perf note: