Created attachment 7559 [details] Example PS file (generated by dvips) Hi. I'm testing gs from GIT repo compiling it on my system: Archlinux, x86_64, gcc 4.6.0 20110513 The simple $ gs --version works fine but a run gs with option gives segfault: $ gs -sDEVICE=pdfwrite -sOutputFile=ex1.pdf ex1.ps <output> GPL Ghostscript GIT PRERELEASE 9.03 (2011-03-30) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. sfopen: gs_parse_file_name failed. sfopen: gs_parse_file_name failed. ./base/gsicc_manage.c:894: gsicc_open_search(): Could not find default_rgb.icc | ./base/gsicc_manage.c:1137: gsicc_set_device_profile(): cannot find device profile Segmentation fault </output> I tried version without stripping symbols and get following under gdb, valgrind and strace (see attached files). Run commands: $ valgrind -v --show-reachable=yes --leak-check=full gs -sDEVICE=pdfwrite -sOutputFile=ex1.pdf ex1.ps $ strace -F -v gs -sDEVICE=pdfwrite -sOutputFile=ex1.pdf ex1.ps > strace-gs.log 2>&1 $ gdb gs GNU gdb (GDB) 7.2 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/bin/gs...(no debugging symbols found)...done. (gdb) run -sDEVICE=pdfwrite -sOutputFile=ex1.pdf ex1.ps Starting program: /usr/bin/gs -sDEVICE=pdfwrite -sOutputFile=ex1.pdf ex1.ps [Thread debugging using libthread_db enabled] GPL Ghostscript GIT PRERELEASE 9.03 (2011-03-30) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. sfopen: gs_parse_file_name failed. sfopen: gs_parse_file_name failed. ./base/gsicc_manage.c:894: gsicc_open_search(): Could not find default_rgb.icc | ./base/gsicc_manage.c:1137: gsicc_set_device_profile(): cannot find device profile Program received signal SIGSEGV, Segmentation fault. 0x000000000055e4d6 in gx_remap_ICC () (gdb) backtrace #0 0x000000000055e4d6 in gx_remap_ICC () #1 0x00000000007ae10c in gx_remap_color () #2 0x000000000079ba58 in gs_fillpage () #3 0x00000000004c9f68 in interp () #4 0x00000000004caac3 in gs_interpret () #5 0x00000000004bfa63 in gs_main_run_string_end () #6 0x00000000004c07cb in run_string () #7 0x00000000004c0931 in runarg () #8 0x00000000004c27af in gs_main_init_with_args () #9 0x0000000000457ae4 in main () (gdb) P.S. GS was compiled using this options: --prefix=/usr \ --enable-dynamic \ --with-ijs \ --with-jbig2dec \ --with-omni \ --with-x \ --enable-fontconfig \ --enable-dbus \ --enable-freetype \ --with-libpaper \ --with-drivers=ALL \ --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \ --enable-debug \ --disable-compile-inits Details in https://github.com/vp1981/pkgbuild/blob/master/ghostscript/PKGBUILD --- WBR, VLadimir Lomov
Created attachment 7560 [details] Valgrind output
Created attachment 7561 [details] strace output
The problem first occurred in the following commit. commit 1787ce3393956701e6241b8efc6f575887c3f5c1 Author: Michael Vrhel <michael.vrhel@artifex.com> Date: Sun May 15 15:50:40 2011 -0700 Change in device ICC profile handling
This should be fixed with http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=f4e1d4b280f6e6ff73d630e2b103a1a6b50c03d9 Where I have forced the device icc directory to be set the the icc manager directory during the device start up prior to actually getting the profile.
(In reply to comment #4) > This should be fixed with > > http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=f4e1d4b280f6e6ff73d630e2b103a1a6b50c03d9 > > Where I have forced the device icc directory to be set the the icc manager > directory during the device start up prior to actually getting the profile. Sorry, I can't check it right now due to this http://bugs.ghostscript.com/show_bug.cgi?id=692306
Hello Vladimir, it gets confusing allowing all users to change the status field. We have now restricted this to the Artifex Staff, if you have more problems you can create a new bug or add comments. Thanks.