Bug 694319 - Seg fault in ps2write
Summary: Seg fault in ps2write
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Writer (show other bugs)
Version: master
Hardware: PC All
: P1 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-14 06:53 UTC by Marcos H. Woehrmann
Modified: 2013-06-17 15:16 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2013-06-14 06:53:48 UTC
The following command line seg faults:

  bin/gs -sDEVICE=ps2write -o test.ps -r300 ./Bug693711.pdf
Comment 2 Marcos H. Woehrmann 2013-06-14 06:55:38 UTC
And here is the gdb stack trace:


GPL Ghostscript GIT PRERELEASE 9.08: ./base/gsalloc.c(1461): Chunk parsing error, 0x164205420 != 0x102e0fa08

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
0x00000001006272b8 in i_free_object (mem=0x102024c68, ptr=0x102e0f6c8, cname=0x10081b962 "s_close_filters(stream)") at gsalloc.c:874
874	    finalize = pstype->finalize;
(gdb) where
#0  0x00000001006272b8 in i_free_object (mem=0x102024c68, ptr=0x102e0f6c8, cname=0x10081b962 "s_close_filters(stream)") at gsalloc.c:874
#1  0x0000000100138440 in s_close_filters (ps=0x7fff5fbff178, target=0x102e0eee8) at stream.c:1230
#2  0x0000000100473406 in ps2write_dsc_header (pdev=0x1020c7c68, pages=45) at gdevpdfu.c:468
#3  0x000000010042ec7e in pdf_close (dev=0x1020c7c68) at gdevpdf.c:2482
#4  0x0000000100642433 in gs_closedevice (dev=0x1020c7c68) at gsdevice.c:656
#5  0x000000010010b82d in gs_main_finit (minst=0x10190cc50, exit_status=0, code=-101) at imain.c:867
#6  0x000000010010bdd6 in gs_to_exit_with_code (mem=0x10190a5d0, exit_status=0, code=-101) at imain.c:931
#7  0x00000001000014d5 in main (argc=6, argv=0x7fff5fbffa48) at gs.c:139
(gdb)
Comment 3 Chris Liddell (chrisl) 2013-06-17 08:51:21 UTC
One problem with this file is fixed here:

http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=579e9024
Comment 4 Chris Liddell (chrisl) 2013-06-17 08:51:53 UTC
(In reply to comment #3)
> One problem with this file is fixed here:
> 
> http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=579e9024

I should have noted: more problems remain!
Comment 5 Chris Liddell (chrisl) 2013-06-17 15:16:39 UTC
Seg fault fixed in:

http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=bd08091d