🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #1904

Severe problems with Ghostscript 2.5 (core dumps)

#1904
From: Jos Vos
Date: Wed, 09 Sep 1992 06:41
54 lines
2984 bytes
Using Ghostscript 2.5 on my Bull DPX/2 UNIX system, I have two situations
where it dumps core:

(1)	When using a printer driver it produces a memory fault, unless I
	compile using -g: then it seems to work correctly (as usual ... :-().
	The stack trace of the core is garbage. Note: I'm NOT using -O
	optimization.
	But because it works with -g, I have a workaround...

(2)	Using original Adobe Type 1 fonts, a floating point exception
	is generated when showing a string. This occurs both using .pfa
	and .pfb font files, and with EVERY font I tried. It happens, at
	the mnoment of the first "show" operation.
	This is the stack trace:

*flatten_sample(ppath=0x3c6f90,n=17,x1=-57754,y1=14084301,x2=-36659,y2=14086144,x3=-27648,y3=14086144)   [gxpcopy.c:306]
flatten_recur(ppath=0x3c6f90,x1=-57754,y1=14084301,x2=-36659,y2=14086144,x3=-27648,y3=14086144,scaled_flat=0)   [gxpcopy.c:214]
gx_path_add_flattened_curve(ppath=0x3c6f90,x1=-57754,y1=14084301,x2=-36659,y2=14086144,x3=-27648,y3=14086144,flatness=0)   [gxpcopy.c:64]
gs_op1_rrcurveto(ps=0x7ffff534,dx1=-598016,dy1=-73728,dx2=-53248,dy2=-417792,dx3=0,dy3=-180224)   [gstype1.c:249]
gs_type1_interpret(pis=0x7ffff774,str=0,pindex=0x7ffffa44)   [gstype1.c:368]
ztype1addpath(op=0x20da34)   [zchar.c:321]
interp(pref=0x7ffffbfc)   [interp.c:515]
gs_interpret(pref=0x7ffffbfc,user_errors=1,pexit_code=0x7ffffc18)   [interp.c:181]
gs_run_string(str=0x29ff14,user_errors=1,pexit_code=0x7ffffc18)   [gsmain.c:178]
run_string(str=0x29ff14)   [gs.c:406]
runarg(argp=0x7ffffc60,pre=0x201a0a,post=0x201a08,nstrs=0)   [gs.c:401]
argproc(arg=0x7ffffd5b)   [gs.c:375]
main()   [gs.c:191]

	This is the code around line 306 in gxpcopy.c:

  300	/* Flatten a segment of the path by repeated sampling. */
  301	/* n is the number of points to sample, including the endpoints; */
  302	/* we require n >= 3. */
  303	private int
  304	flatten_sample(gx_path *ppath, int n,
  305	  fixed x1, fixed y1, fixed x2, fixed y2, fixed x3, fixed y3)
> 306	{	const fixed
  307			x0 = ppath->position.x,
  308			y0 = ppath->position.y;
  309		/* We spell out some multiplies by 3, */
  310		/* for the benefit of compilers that don't optimize this. */
  311		const fixed
  312			x01 = x1 - x0,
  313			cx = (x01 << 1) + x01,		/* 3*(x1-x0) */
  314			x12 = x2 - x1,
  315			bx = (x12 << 1) + x12 - cx,	/* 3*(x2-2*x1+x0) */
  316			ax = x3 - bx - cx - x0;		/* x3-3*x2+3*x1-x0 */

Anyone having a solution for one of these problems?

-- 
--    Jos Vos <jos@bull.nl>   (UUCP: ...!{uunet,mcsun,sun4nl}!nlbull!jos)
--    Bull Nederland NV, Product Support Unix, Amsterdam, The Netherlands
Technical Details
Message-ID: <1432@nlbull.bull.nl>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!nlbull!jos

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!nlbull!jos
From: jos@bull.nl (Jos Vos)
Newsgroups: comp.lang.postscript
Subject: Severe problems with Ghostscript 2.5 (core dumps)
Message-ID: <1432@nlbull.bull.nl>
Date: 9 Sep 92 06:41:09 GMT
Organization: Bull, P.O. Box 22859, NL-1100 DJ Amsterdam, The Netherlands
Lines: 54