[tex-k] Arithmetic overflow exception with METAFONT

Wolfgang Helbig helbig at mailbox.org
Mon Oct 5 19:08:50 CEST 2020


Hi,

while playing around with TeX-FPC, a TeX implementation for Unix based 
on the Free Pascal Compiler, I observed something strange:

mf-FPC runs flawlessly while building successfully gf files for the cm 
fonts. But, when I turn on Arithmetic Overflow by a compiler directive, 
it will abort sooner or later. Here is a sample output on the terminal: 
The lower part looks like a stack trace. It comes from the run time 
system of FPC.

Any ideas? The integers are 32 bit wide, the arithmetic is done with 64 
bit arithmetic, which hardly ever overflows. TeX-FPC survives both 
overflow and range check.

This is not the arithmetic overflow checked by mf-FPC in module 99! This 
one is checked by the run time system.

$ mf "\\mode=localfont; input cmmi5"
This is METAFONT-FPC (preloaded base=plain 2020.9.20)
(MFinputs/cmmi5.mf (MFinputs/cmbase.mf) (MFinputs/mathit.mf 
(MFinputs/romanu.mf
The letter A [65]
The letter B [66]
The letter C [67]
The letter D [68]
The letter E [69]
The letter F [70]
The letter G [71]
The letter H [72]
The letter I [73]
The letter J [74]
The letter K [75]
The letter L [76]
The letter M [77]
The letter N [78]
The letter O [79]
The letter P [80]
The letter Q [81]
The letter R [82]
The letter S [83]
The letter T [84]
The letter U [85]
The letter V [86]
The letter W [87]
The letter X [88]
The letter Y [89]
The letter Z [90]) (MFinputs/itall.mf
Italic letter a [97]
Italic letter b [98]
Italic letter c [99]
Italic letter d [100]
Italic letter e [101]
Italic letter fAn unhandled exception occurred at $000000010BF51D3E:
EIntOverflow: Arithmetic overflow
   $000000010BF51D3E
   $000000010BF582DB
   $000000010BF6EF15
   $000000010BF70F64
   $000000010BF9C013
   $000000010BF9E760
   $000000010BFA1995
   $000000010BFA2C27
   $000000010BFA2E4F
   $000000010BFA3110
   $000000010BF9E494

Greetings,

-- 
Wolfgang Helbig



More information about the tex-k mailing list.