Bug 165962

Summary: segfault Ghostscript when FAPI is used
Product: [Fedora] Fedora Reporter: Akira TAGOH <tagoh>
Component: ghostscriptAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: eng-i18n-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.15-0.rc4.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-08-15 12:19:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
testcase
none
proposed change for the spec file
none
cidfmap
none
cidfmap.ja to check if gs without FAPI works for the attached PS none

Description Akira TAGOH 2005-08-15 10:48:21 UTC
Description of problem:
gs segfaults when I preview an attached testcase with x11 device.

Version-Release number of selected component (if applicable):
8.15-0.rc4.1

How reproducible:
always

Steps to Reproduce:
1.gs -sDEVICE=x11 article9.ps
2.
3.
  
Actual results:
gs segfaults.

Expected results:
no segfaults.

Additional info:
(gdb) r
Starting program: /usr/bin/gs -sDEVICE=x11 /home/tagoh/article9.ps
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0x76f000
ESP Ghostscript 815.00 (2005-08-11)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading a TT font from /usr/share/fonts/japanese/TrueType/sazanami-gothic.ttf to
emulate a CID font GothicBBB-Medium ... Done.
Font GothicBBB-Medium ( aliased from Sazanami-Gothic-Regular ) is being rendered
with FAPI=FreeType
Loading a TT font from /usr/s
Program received signal SIGSEGV, Segmentation fault.
0x004ae4d8 in FT_Outline_Decompose () from /usr/lib/libfreetype.so.6
(gdb) bt
#0  0x004ae4d8 in FT_Outline_Decompose () from /usr/lib/libfreetype.so.6
#1  0x0089ed9b in get_char_outline (a_server=0x97b81d0, a_path=0xbf8b6970) at
./src/fapi_ft.c:820
#2  0x00899655 in outline_char (i_ctx_p=0x97b31f0, I=0x97b81d0,
import_shift_v=-8, penum_s=0x9937110, path=0x97b3560, close_path=1)
    at ./src/zfapi.c:1055
#3  0x008998c3 in fapi_finish_render (i_ctx_p=0x97b31f0) at ./src/zfapi.c:1110
#4  0x0089acfb in FAPI_char (i_ctx_p=0x97b31f0, bBuildGlyph=1, charstring=0x0)
at ./src/zfapi.c:1571
#5  0x0082bd95 in gs_interpret (pi_ctx_p=0xbfa5a4, pref=0xbf8b7170,
user_errors=1, pexit_code=0xbf8b7248, perror_object=0xbf8b7240)
    at ./src/interp.c:1236
#6  0x008217ff in gs_main_interpret (minst=0xbfa3a0, pref=Variable "pref" is not
available.
) at ./src/imain.c:210
#7  0x008219fa in gs_main_run_string_end (minst=0xbfa3a0, user_errors=1,
pexit_code=0xbf8b7248, perror_object=0xbf8b7240)
    at ./src/imain.c:600
#8  0x00821d6d in gs_main_run_string_with_length (minst=0xbfa3a0,
    str=0x98fffd8 "<2f686f6d652f7461676f682f61727469636c65392e7073>.runfile",
length=56, user_errors=1, pexit_code=0xbf8b7248,
    perror_object=0xbf8b7240) at ./src/imain.c:558
#9  0x00821dbb in gs_main_run_string (minst=0xbfa3a0, str=0x98fffd8
"<2f686f6d652f7461676f682f61727469636c65392e7073>.runfile",
    user_errors=1, pexit_code=0xbf8b7248, perror_object=0xbf8b7240) at
./src/imain.c:540
#10 0x0082274f in run_string (minst=0xbfa3a0, str=Variable "str" is not available.
) at ./src/imainarg.c:778
#11 0x00822899 in runarg (minst=0xbfa3a0, pre=0xa4fa82 "", arg=0x97b8280
"/home/tagoh/article9.ps", post=0xa31767 ".runfile", options=Variable "options"
is not available.
)
    at ./src/imainarg.c:768
#12 0x00822ae9 in argproc (minst=0xbfa3a0, arg=Variable "arg" is not available.
) at ./src/imainarg.c:703
#13 0x00824a79 in gs_main_init_with_args (minst=0xbfa3a0, argc=3,
argv=0xbf8b8104) at ./src/imainarg.c:216
#14 0x008258eb in gsapi_init_with_args (minst=0xbfa3a0, argc=3, argv=0xbf8b8104)
at ./src/iapi.c:144
#15 0x080488f2 in main (argc=3, argv=0xbf8b8104) at ./src/dxmainc.c:88

Comment 1 Akira TAGOH 2005-08-15 10:48:21 UTC
Created attachment 117734 [details]
testcase

Comment 2 Akira TAGOH 2005-08-15 10:51:05 UTC
BTW It was ok without -sDEVICE=x11.

Comment 3 Akira TAGOH 2005-08-15 10:55:43 UTC
Created attachment 117737 [details]
proposed change for the spec file

I've comfirmed that gs works without FAPI for CJK fonts. and it looks better
than FAPI ATM. so I'd propose disabling FAPI again and use cidfmap instead of
FAPIcidfmap -- gs won't read FAPI* configuration files once gs is built without
FAPI enabled. so I didn't remove FAPIcidfmap from the spec intentionally.

Comment 4 Akira TAGOH 2005-08-15 10:56:44 UTC
Created attachment 117738 [details]
cidfmap

Comment 5 Akira TAGOH 2005-08-15 11:07:28 UTC
Created attachment 117739 [details]
cidfmap.ja to check if gs without FAPI works for the attached PS

This cidfmap.ja is what I'm going to use for fonts-japanese.

Comment 7 Tim Waugh 2005-08-15 12:19:06 UTC
Thanks.  Fixed package building.