Dear Maintainer,
with the help of the core saved in the artifacts I found that
the crash happens when fontforge tries to print some logging.

It just started to crash if I run the command with LANG=C.

It seems to be caused by the call to function iconv returns
with errno==EILSEQ (Illegal byte sequence).
This could possibly be this "©" in the string to be processed.

Kind regards,
Bernhard



$ LANG=C rr record fontforge -script 
/home/benutzer/source/fonts-femkeklaver/git/fonts-femkeklaver/debian/clear-fstype.pe
 /home/benutzer/source/fonts-femkeklaver/git/fonts-femkeklaver/femkeklaver.ttf
$ rr replay -o-q
...
Breakpoint 3, iconv (cd=cd@entry=0x55b4437f72d0, 
inbuf=inbuf@entry=0x7fff48abee88, inbytesleft=inbytesleft@entry=0x7fff48abee80, 
outbuf=outbuf@entry=0x7fff48abeea0, 
outbytesleft=outbytesleft@entry=0x7fff48abee98) at ./iconv/iconv.c:32
32      {
(rr) finish
Run till exit from #0  iconv (cd=cd@entry=0x55b4437f72d0, 
inbuf=inbuf@entry=0x7fff48abee88, inbytesleft=inbytesleft@entry=0x7fff48abee80, 
outbuf=outbuf@entry=0x7fff48abeea0, 
outbytesleft=outbytesleft@entry=0x7fff48abee98) at ./iconv/iconv.c:32
0x00007fd0fc8a0b69 in do_iconv (cd=0x55b4437f72d0, inbuf=<optimized out>, 
inbuf@entry=0x7fff48abeef0, incount=<optimized out>, inunitsize=inunitsize@entry=1, 
outunitsize=outunitsize@entry=1) at ./Unicode/ucharmap.c:101
101             if (iconv(cd, (iconv_arg2_t)&inbuf, &incount, &dst, &outremain) 
== (size_t)-1) {
Value returned is $19 = 18446744073709551615
(rr) next
102                 if (errno == E2BIG) {
(rr) print errno
$20 = 84
(rr) print inbuf
$21 = <optimized out>
(rr) up
#1  0x00007fd0fc8a0fd5 in utf82def_copy (ufrom=ufrom@entry=0x7fff48abeef0 "Warning: 
Mac and Windows entries in the 'name' table differ for the\n Copyright string in the 
language English (US)\n Mac String: Typeface © (your company). 2008. All Rights 
Reserved\nWindows String: Typeface © (femkeklaver.nl). 2008. All Rights Reserved\n") 
at ./Unicode/ucharmap.c:159
159         return do_iconv(from_utf8, ufrom, strlen(ufrom), sizeof(ufrom[0]), 
sizeof(char));
(rr) print ufrom
$22 = 0x7fff48abeef0 "Warning: Mac and Windows entries in the 'name' table differ 
for the\n Copyright string in the language English (US)\n Mac String: Typeface © (your 
company). 2008. All Rights Reserved\nWindows String: Typeface © (femkeklaver.nl). 2008. 
All Rights Reserved\n"
(rr) bt
#0  do_iconv (cd=0x55b4437f72d0, inbuf=<optimized out>, inbuf@entry=0x7fff48abeef0, 
incount=<optimized out>, inunitsize=inunitsize@entry=1, 
outunitsize=outunitsize@entry=1) at ./Unicode/ucharmap.c:102
#1  0x00007fd0fc8a0fd5 in utf82def_copy (ufrom=ufrom@entry=0x7fff48abeef0 "Warning: 
Mac and Windows entries in the 'name' table differ for the\n Copyright string in the 
language English (US)\n Mac String: Typeface © (your company). 2008. All Rights 
Reserved\nWindows String: Typeface © (femkeklaver.nl). 2008. All Rights Reserved\n") 
at ./Unicode/ucharmap.c:159
#2  0x00007fd0fc958a84 in NOUI__LogError (format=<optimized out>, 
ap=ap@entry=0x7fff48abf0b0) at ./fontforge/nouiutil.c:55
#3  0x00007fd0fc958c49 in NOUI_LogError (format=<optimized out>) at 
./fontforge/nouiutil.c:66
#4  0x00007fd0fc98555a in TTFAddLangStr (language=<optimized out>, spec=<optimized out>, 
plat=<optimized out>, stroff=<optimized out>, strlength=<optimized out>, id=0, 
info=0x7fff48abf220, ttf=0x55b4437ff990) at ./fontforge/parsettf.c:1609
#5  readttfcopyrights (info=0x7fff48abf220, ttf=0x55b4437ff990) at 
./fontforge/parsettf.c:1748
#6  readttfpreglyph (info=0x7fff48abf220, ttf=0x55b4437ff990) at 
./fontforge/parsettf.c:1814
#7  readttf (filename=0x55b4437ff930 
"/home/benutzer/source/fonts-femkeklaver/git/fonts-femkeklaver/femkeklaver.ttf",
 info=0x7fff48abf220, ttf=0x55b4437ff990) at ./fontforge/parsettf.c:5554
#8  _SFReadTTF (ttf=ttf@entry=0x55b4437ff990, flags=flags@entry=0, 
openflags=openflags@entry=0, filename=filename@entry=0x55b4437ff930 
"/home/benutzer/source/fonts-femkeklaver/git/fonts-femkeklaver/femkeklaver.ttf",
 chosenname=chosenname@entry=0x0, fd=fd@entry=0x0) at ./fontforge/parsettf.c:6342
#9  0x00007fd0fca66a7a in _ReadSplineFont (file=<optimized out>, file@entry=0x0, 
filename=filename@entry=0x55b4437ff870 
"/home/benutzer/source/fonts-femkeklaver/git/fonts-femkeklaver/femkeklaver.ttf", 
openflags=openflags@entry=0) at ./fontforge/splinefont.c:1130
#10 0x00007fd0fca6794c in ReadSplineFont (filename=filename@entry=0x55b4437ff870 
"/home/benutzer/source/fonts-femkeklaver/git/fonts-femkeklaver/femkeklaver.ttf",
 openflags=openflags@entry=0) at ./fontforge/splinefont.c:1310
#11 0x00007fd0fca67a51 in LoadSplineFont (filename=filename@entry=0x55b4437ff810 
"/home/benutzer/source/fonts-femkeklaver/git/fonts-femkeklaver/femkeklaver.ttf",
 openflags=openflags@entry=0) at ./fontforge/splinefont.c:1361
#12 0x00007fd0fca0701e in bOpen (c=0x7fff48abfc10) at 
./fontforge/scripting.c:1802
#13 0x00007fd0fca0a273 in docall (c=c@entry=0x7fff48ac03e0, 
name=name@entry=0x7fff48abfe60 "Open", val=val@entry=0x7fff48ac0280) at 
./fontforge/scripting.c:9241
#14 0x00007fd0fca0a6ee in handlename (c=c@entry=0x7fff48ac03e0, 
val=val@entry=0x7fff48ac0280) at ./fontforge/scripting.c:9354
#15 0x00007fd0fca0ba77 in term (c=c@entry=0x7fff48ac03e0, 
val=val@entry=0x7fff48ac0280) at ./fontforge/scripting.c:9592
#16 0x00007fd0fca0be23 in mul (c=c@entry=0x7fff48ac03e0, 
val=val@entry=0x7fff48ac0280) at ./fontforge/scripting.c:9737
#17 0x00007fd0fca0c0e5 in add (c=c@entry=0x7fff48ac03e0, 
val=val@entry=0x7fff48ac0280) at ./fontforge/scripting.c:9783
#18 0x00007fd0fca0c4be in comp (c=c@entry=0x7fff48ac03e0, 
val=val@entry=0x7fff48ac0280) at ./fontforge/scripting.c:9858
#19 0x00007fd0fca0c7ad in _and (c=c@entry=0x7fff48ac03e0, 
val=val@entry=0x7fff48ac0280) at ./fontforge/scripting.c:9899
#20 0x00007fd0fca0c96e in _or (val=0x7fff48ac0280, c=0x7fff48ac03e0) at 
./fontforge/scripting.c:9931
#21 assign (c=c@entry=0x7fff48ac03e0, val=val@entry=0x7fff48ac0280) at 
./fontforge/scripting.c:9967
#22 0x00007fd0fca09534 in expr (val=0x7fff48ac0280, c=0x7fff48ac03e0) at 
./fontforge/scripting.c:10045
#23 ff_statement (c=c@entry=0x7fff48ac03e0) at ./fontforge/scripting.c:10258
#24 0x00007fd0fca0d6d1 in ProcessNativeScript (argc=argc@entry=4, 
argv=argv@entry=0x7fff48ac0848, script=script@entry=0x0) at 
./fontforge/scripting.c:10405
#25 0x00007fd0fca0dd9d in _CheckIsScript (argv=0x7fff48ac0848, argc=1) at 
./fontforge/scripting.c:10505
#26 CheckIsScript (argc=argc@entry=4, argv=argv@entry=0x7fff48ac0848) at 
./fontforge/scripting.c:10546
#27 0x000055b44351f4aa in fontforge_main (argc=4, argv=0x7fff48ac0848) at 
./fontforgeexe/startnoui.c:134
#28 0x00007fd0fc64618a in __libc_start_call_main (main=main@entry=0x55b44351f160 
<main>, argc=argc@entry=4, argv=argv@entry=0x7fff48ac0848) at 
../sysdeps/nptl/libc_start_call_main.h:58
#29 0x00007fd0fc646245 in __libc_start_main_impl (main=0x55b44351f160 <main>, argc=4, 
argv=0x7fff48ac0848, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized 
out>, stack_end=0x7fff48ac0838) at ../csu/libc-start.c:381
#30 0x000055b44351f191 in _start ()
(rr) finish
Run till exit from #1  0x00007fd0fc8a0fd5 in utf82def_copy 
(ufrom=ufrom@entry=0x7fff48abeef0 "Warning: Mac and Windows entries in the 'name' 
table differ for the\n Copyright string in the language English (US)\n Mac String: 
Typeface © (your company). 2008. All Rights Reserved\nWindows String: Typeface © 
(femkeklaver.nl). 2008. All Rights Reserved\n") at ./Unicode/ucharmap.c:159
0x00007fd0fc958a84 in NOUI__LogError (format=<optimized out>, 
ap=ap@entry=0x7fff48abf0b0) at ./fontforge/nouiutil.c:56
56          fprintf(stderr,"%s",str);
Value returned is $23 = 0x0
(rr) print str
$24 = <optimized out>
(rr) next

Program received signal SIGSEGV, Segmentation fault.
__strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:76
76              VPCMPEQ (%rdi), %ymm0, %ymm1
(rr) bt 5
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:76
#1  0x00007fd0fc695425 in __GI__IO_fputs (str=str@entry=0x0, fp=0x7fd0fc7f2680 
<_IO_2_1_stderr_>) at ./libio/iofputs.c:33
#2  0x00007fd0fc958a9a in fprintf (__fmt=<synthetic pointer>, __stream=<optimized 
out>) at /usr/include/x86_64-linux-gnu/bits/stdio2.h:79
#3  NOUI__LogError (format=<optimized out>, ap=ap@entry=0x7fff48abf0b0) at 
./fontforge/nouiutil.c:56
#4  0x00007fd0fc958c49 in NOUI_LogError (format=<optimized out>) at 
./fontforge/nouiutil.c:66
(More stack frames follow...)
(rr) up
#1  0x00007fd0fc695425 in __GI__IO_fputs (str=str@entry=0x0, fp=0x7fd0fc7f2680 
<_IO_2_1_stderr_>) at ./libio/iofputs.c:33
33        size_t len = strlen (str);
(rr) print str
$25 = 0x0
(rr)


/usr/include/asm-generic/errno.h:67:#define     EILSEQ          84      /* 
Illegal byte sequence */

Reply via email to