Follow-up Comment #5, bug #46988 (project gforth):
Looks like the culprit is the relocate loop while symbol[i]!=0. That last
zero doesn't get copied. If I copy that last 0, valgrind reports nothing for
gforth-ditc.
So I suggest to keep the malloc and correctly set the terminating 0 for the
allocated arrays. That way we can check for unintended use of the
uninitialized part of the array.
Add the following before line 418 in engine/engine.c:
xts[i] = symbols[i] = 0;
and try if the bug persists (with the mallocs).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46988>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
bug-gforth mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-gforth