Bug#841313: latex-cjk-japanese-wadalab: FTBFS: Create .afm and .pfa fonts from dg. \n Segmentation fault (core dumped)
On Wed, Oct 19, 2016 at 10:01:52PM +0200, Hilmar Preuße wrote:
>...
> e_printf(form,i0,i1,i2,i3,i4,i5,i6,i7,i8,i9)
> char *form;
> {
> int len,i;
> unsigned char buf[4096];
> sprintf(buf,form,i0,i1,i2,i3,i4,i5,i6,i7,i8,i9);
> len=strlen(buf);
> for(i=0;i<len;i++)
> e_putchar(buf[i]);
> }
>
> In line 255 (function output_pfa) it is called like this
>
> e_printf("/StdHW [ %s ] |-\n",StdHW);
>
> I /guess/ there is a thinks in string processing. Sorry, I don't have enough
> knowledge in C to help here. Does that ring anywhere a bell on your side? Is
> the problem reproducible e.g. in i386?
This is a 64bit problem, relevant gcc warning:
wftodm.c:301:1: warning: type of 'i0' defaults to 'int' [-Wimplicit-int]
i0 is the variable where the pointer to the string is passed.
The minimal fix for the segfault is:
--- latex-cjk-japanese-wadalab-0.20050817.orig/wftodm.c
+++ latex-cjk-japanese-wadalab-0.20050817/wftodm.c
@@ -300,6 +300,7 @@ output_pfa(file)
e_printf(form,i0,i1,i2,i3,i4,i5,i6,i7,i8,i9)
char *form;
+long i0;
{
int len,i;
unsigned char buf[4096];
After building with this fix I compared checksums of all files under
debian/latex-cjk-japanese-wadalab for the successful amd64 build and
a build on i386, and they were identical.
> Hilmar
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Reply to: