[tlbuild] ptex ini creation seg faults on OpenBSD

Peter Breitenlohner peb at mppmu.mpg.de
Wed Jul 21 11:37:00 CEST 2010


On Tue, 20 Jul 2010, Karl Berry wrote:

>    seems to be a bug/glitch because get_jfm_pos should certainly not be called
>    with f=0= null_font!
>
> Some evidence that it's not a compiler bug would be useful, since no
> other platform is not reporting this.  E.g., compile with just -g.  Try
> a different compiler version.

Hi Edd,

independently, you could try this patch as temporary fix (certainly not
addressing the underlying problem) and see if this prevents the segfault.

Index: source/texk/web2c/ptexdir/ptex-base.ch
===================================================================
--- source/texk/web2c/ptexdir/ptex-base.ch	(revision 19551)
+++ source/texk/web2c/ptexdir/ptex-base.ch	(working copy)
@@ -6719,7 +6719,7 @@
  jc:=toDVI(kcode);
  sp:=1; { start position }
  ep:=font_num_ext[f]-1; { end position }
-if (kchar_code(f)(sp)<=jc)and(jc<=kchar_code(f)(ep)) then
+if (ep>=1)and(kchar_code(f)(sp)<=jc)and(jc<=kchar_code(f)(ep)) then
    begin while (sp <= ep) do
      begin mp:=sp+((ep-sp) div 2);
      if jc<kchar_code(f)(mp) then ep:=mp-1

Regards
Peter


More information about the tlbuild mailing list