dvipng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dvipng] DVIPNG segfault on DVI output of simple TEX file?


From: Jan-Åke Larsson
Subject: Re: [Dvipng] DVIPNG segfault on DVI output of simple TEX file?
Date: Mon, 17 Jun 2013 11:10:46 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

Thanks for the bug report. This comes from initiating the color list
from a file that exists in any latex dist, and then deciding that xcolor
should have priority.

Will be fixed in the next release. Perhaps I have time to do that on my
vacation.

/JÅ




On 06/17/2013 10:54 AM, Shriramana Sharma wrote:
> On Mon, Jun 17, 2013 at 2:03 PM, Shriramana Sharma <address@hidden> wrote:
>> 352             colornamep=LoadColornameFile(colordef[0]);
>> (gdb)
>> 353           tmp=colornamep;
>> (gdb) print tmp
>> $11 = (struct colorname *) 0x0
>> (gdb) next
>> 354           while((tmp->next!=NULL || colordef[unloaded]!=NULL)
>> (gdb) print tmp
>> $13 = (struct colorname *) 0x0
>> (gdb) next
>> Program received signal SIGSEGV, Segmentation fault.
>>
>> It is evident that there is no check here to ensure that tmp is *not*
>> NULL before dereferencing it by -> on line 354.
> 
> So tmp evidently becomes NULL only because it is assigned to the
> output of LoadColorFileName. I figured that function returned NULL
> because it couldn't find the file asked for. So I did the next/step
> routine again and asked gdb what colordef[0] was:
> 
> 352             colornamep=LoadColornameFile(colordef[0]);
> (gdb) print colordef[0]
> $1 = 0x417de8 "xcolor.sty"
> (gdb) print colordef
> $2 = {0x417de8 "xcolor.sty", 0x417df3 "dvipsnam.def", 0x417e00
> "svgnam.def", 0x417e0b "x11nam.def", 0x0}
> 
> Then I did searched on packages.ubuntu.com for packages providing
> xcolor.sty: 
> http://packages.ubuntu.com/search?searchon=contents&keywords=xcolor.sty&mode=exactfilename&suite=raring&arch=any
> 
> Sure enough, latex-xcolor
> (http://packages.ubuntu.com/raring/latex-xcolor) wasn't installed on
> my system and installing it fixed everything right up to the
> functioning of SymPyPrt on IPy3.
> 
> So there are two bugs here:
> 
> dvipng's color.c has a bug whereby it does not test for the output of
> LoadColorFileName to be NULL when it should output a meaningful error
> message complaining that it could not find xcolor.sty.
> 
> Debian's dvipng packaging (inherited by Ubuntu) has the bug whereby it
> does not have a dependency on latex-xcolor to provide the requisite
> color data files that dvipng expects.
> 
> I hope this helps. I'll be filing a Debian bug and update the Ubuntu
> bug accordingly. Please do fix this and issue a point release for
> dvipng.
> 


-- 
Linux: The choice of a GNU generation.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]