Bug 689326 - Ubuntu patch to fix coredumps
Summary: Ubuntu patch to fix coredumps
Status: NOTIFIED WORKSFORME
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: master
Hardware: All All
: P4 normal
Assignee: Till Kamppeter
URL: http://www.cups.org/str.php?L1635
Keywords:
Depends on:
Blocks: 689315
  Show dependency tree
 
Reported: 2007-07-04 08:47 UTC by Till Kamppeter
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
Patch to fix crash bugs (3.07 KB, patch)
2007-07-04 08:48 UTC, Till Kamppeter
Details | Diff
Another patch to fix these bugs, use the more suitable one (2.40 KB, patch)
2007-07-04 08:51 UTC, Till Kamppeter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Till Kamppeter 2007-07-04 08:47:49 UTC
See

http://www.cups.org/str.php?L1635

------------------------------------------------------------------------------
Description from the ubuntu changelog:
  * Close and reopen x11 driver when size changes.  Fixes
    coredump in x11 driver under gv with antialiasing turned
    (reproducible in 8.01 on a 16bbp display).
    Related to Ubuntu 17141, and to fix for Debian #254206.

  * Fix coredumping bug on ppc: Ubuntu bugzilla:
     http://bugzilla.ubuntu.com/show_bug.cgi?id=14311
     http://bugzilla.ubuntu.com/show_bug.cgi?id=13771
    This is the same issue as
     http://bugs.ghostscript.com/show_bug.cgi?id=687643
     http://bugs.ghostscript.com/show_bug.cgi?id=687730
    discussed in
     http://ghostscript.com/pipermail/gs-code-review/2004-September/004649.html
    and probably the same as Debian bugs #324796 and #325570 and
    perhaps others in Debian's gs-esp and gs-gpl.

    This bug is due to gs's incorrect assumption that (where ref is an
    important struct inside gs) sizeof(ref) % alignof(jmp_buf) == 0.  This
    is not true on ppc and apparently not necessarily on Itanium either.

    The `fix' I have applied is to wrap setjmp/longjmp up in macros which
    arrange for jmp_buf to have alignment 1, as sketched out in the URLs
    above.  A previous attempt to fix it by padding ref out to the
    alignment of jmp_buf failed and I don't know why; but I suspect other
    unjustified assumptions in gs.

    GhostScript's algorithms ought to be repaired not to assume
    falsehoods.
------------------------------------------------------------------------------

Patch attached.
Comment 1 Till Kamppeter 2007-07-04 08:48:53 UTC
Created attachment 3149 [details]
Patch to fix crash bugs
Comment 2 Till Kamppeter 2007-07-04 08:51:14 UTC
Created attachment 3150 [details]
Another patch to fix these bugs, use the more suitable one
Comment 3 Ray Johnston 2007-07-10 09:42:06 UTC
Please re-test (on the appropriate machine).  
  
We believe that Raph fixed this before closing 
http://bugs.ghostscript.com/show_bug.cgi?id=687643 
 
Without more test case examples we cannot duplicate the problem. 
Comment 4 Till Kamppeter 2007-07-10 09:57:28 UTC
Unfortunately, I cannot test the second point as I do not have a PPC machine. I
did not hit this bug by myself. I have reported this because the problem
occurred and was fixed in ESP GS and so it is a potential problem in GPL GS.