Bug 694319

Summary: Seg fault in ps2write
Product: Ghostscript Reporter: Marcos H. Woehrmann <marcos.woehrmann>
Component: PS WriterAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED FIXED    
Severity: normal CC: chris.liddell
Priority: P1    
Version: master   
Hardware: PC   
OS: All   
See Also: http://bugs.ghostscript.com/show_bug.cgi?id=693711
Customer: Word Size: ---

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