Description

The patches previously distributed to update Zip to use Quetzal have a bug in the quetzal.c file.

How to fix the bug

The bug is simple to find and fix; locate lines 117-120. If you have the bug, they will look like this: /* frames is a list of FPs, most recent first */ frames[0] = sp-5; /* what FP would be if we did a call now */ for(init_fp=fp, n=0; init_fp <= STACK_SIZE-5; init_fp=stack[init_fp+2]) init_fp = frames[n] + 4; The fix is simply to insert the missing line 120. (This line somehow went missing between my checking that the code worked and my distributing it). When you have done this, the code should look like: /* frames is a list of FPs, most recent first */ frames[0] = sp-5; /* what FP would be if we did a call now */ for(init_fp=fp, n=0; init_fp <= STACK_SIZE-5; init_fp=stack[init_fp+2]) frames[++n] = init_fp; init_fp = frames[n] + 4;

Credits

Thanks to John Kennedy for noticing this.


Back to Home Page 1