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

Bug#291438: tetex-bin: dvipdfm segfaults when used with hyperref and hypertex



>>>>> "FK" == Frank Küster <frank@debian.org> writes:

    >>> I will try it in a clean sarge environment soon.
    >> No problems on sid (powerpc) with tetex-bin_2.0.2-26.

    FK> I also did not get a segfault in my i386 sarge chroot. I'm
    FK> helpless - how can one debug this? The only idea I have, since
    FK> Prabhu seems to be familiar with gdb, would be to recompile
    FK> dvipdfm without stripping and optimising. I think this should
    FK> be easily possible in the following way:

[...]

Sorry for taking so long to respond.  I tried this on yet another
fresh install of sarge (on an AMD Sempron) with tetex-bin version
2.0.2-25 and got the segmentation fault there too!  

Anyway, I compiled dvipdfm without optimizations as you suggested.
Here are some results.

(gdb) r -o /tmp/test.pdf /tmp/test.dvi
Starting program: /tmp/tetex-bin-2.0.2/texk/dvipdfm/dvipdfm.exe -o /tmp/test.pdf /tmp/test.dvi

/tmp/test.dvi -> /tmp/test.pdf
[1]
Program received signal SIGSEGV, Segmentation fault.
0x401103c2 in memcmp () from /lib/libc.so.6
(gdb) bt
#0  0x401103c2 in memcmp () from /lib/libc.so.6
#1  0x0804e0be in cmp_dest (d1=0x812c700, d2=0x812c70c) at pdfdoc.c:597
#2  0x400c4120 in msort_with_tmp () from /lib/libc.so.6
#3  0x400c4360 in qsort () from /lib/libc.so.6
#4  0x0804e3a0 in finish_dests_tree () at pdfdoc.c:651
#5  0x0804f46f in pdf_doc_close () at pdfdoc.c:1048
#6  0x08052669 in dvi_close () at dvi.c:1205
#7  0x08065666 in main (argc=3, argv=0xbffff7f8) at dvipdfm.c:665
(gdb) up
#1  0x0804e0be in cmp_dest (d1=0x812c700, d2=0x812c70c) at pdfdoc.c:597
597       if ((tmp = memcmp (((dest_entry *) d1) -> name, ((dest_entry *) d2)
(gdb) list
592     {
593       unsigned length;
594       int tmp;
595       length = MIN (((dest_entry *) d1) -> length, ((dest_entry *) d2) ->
596                     length);
597       if ((tmp = memcmp (((dest_entry *) d1) -> name, ((dest_entry *) d2)
598                           -> name, length)) != 0)
599         return tmp;
600       if (((dest_entry *) d1) -> length == ((dest_entry *) d2) -> length)
601         return 0;

(gdb) print length
$1 = 135461632

That looks wrong?  I did not go much farther.  I'll try and spend more
time on it in a short while and get back to you if I see any light.

I also notice that you seem to refer to tetex-bin-2.0.2-26 where as I
am using 2.0.2-25.  Thinking that it would make a difference, I
downloaded the 2.0.2-26 deb from unstable, extracted its dvipdfm
binary and had the same problem with that too (on two different
machines).

Just to eliminate one possibility I've attached the test.dvi file that
was produced via "latex test.tex".  This one segfaults for me with

 $ dvipdfm --version
 dvipdfm, version 0.13.2c, Copyright (C) 1998, 1999 by Mark A. Wicks

 $ dvipdfm test.dvi
 test.dvi -> test.pdf
 [1]Segmentation fault

Atleast if the dvi file works for you we know its a dvipdfm specific
bug.  Of course, the dvi file renders just fine on xdvi and converts
to PS and PDF just fine when I use dvips or dvipdf.  dvipdfm alone
seems to run into this problem.

Thanks.

cheers,
prabhu

Attachment: test.dvi
Description: Binary data


Reply to: