on master help sign in
Fix potential memory error on tail calls
dd065f3Edwin Brady
rts/idris_rts.h+1−1
@@ -332,7 +332,7 @@ size_t GETSTROFFLEN(VAL stroff);
332#define PROJECT(vm,r,loc,num) \
332#define PROJECT(vm,r,loc,num) \
333 memcpy(&(LOC(loc)), ((Con*)(r))->args, sizeof(VAL)*num)
333 memcpy(&(LOC(loc)), ((Con*)(r))->args, sizeof(VAL)*num)
334#define SLIDE(vm, args) \
334#define SLIDE(vm, args) \
335− memcpy(&(LOC(0)), &(TOP(0)), sizeof(VAL)*args)
335+ memmove(&(LOC(0)), &(TOP(0)), sizeof(VAL)*args)
336
336
337void* iallocate(VM *, size_t, int);
337void* iallocate(VM *, size_t, int);
338
338