[tex-k] Arithmetic overflow exception with METAFONT

Wolfgang Helbig helbig at mailbox.org
Tue Oct 6 11:44:05 CEST 2020


Hi,

the FPC compiler/runtime was the culprit. See issue 
https://bugs.freepascal.org/view.php?id=37875
The overflow is thrown in procedure edge_prep, module 329. Here is the 
statement from mf.p:
IF NOT(ABS(INT(MEM[CUREDGES+2].HH.LH+MEM[CUREDGES+3].HH.LH-8192))<4096)

The int type cast is needed because of another error in the FPC 
compiler. (issue 37876)

But otherwise, I am quite satisfied with the Free Pascal Compiler.

Thanks for your replies,
Wolfgang


Am 05.10.20 um 23:15 schrieb Karl Berry:
> Hi Wolfgang,
>
>      Italic letter fAn unhandled exception occurred at $000000010BF51D3E:
>
> As far as I can see, you'll have to run it under a debugger and see
> what's happening. I can't divine anything from "unhandled exception".
>
> It is not all that likely, but certainly possible that mf is triggering
> a compiler bug. It has happened many times in the past. You could try
> compiling without any optimization (if you aren't already) to reduce
> the chance of that. --best, karl.

-- 
Wolfgang Helbig



More information about the tex-k mailing list.