summaryrefslogtreecommitdiff
path: root/pcl
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2022-01-19 18:23:32 +0000
committerRobin Watts <Robin.Watts@artifex.com>2022-01-19 18:59:48 +0000
commit47b3cf18f08c7d6258b773572723b80c6405ffae (patch)
tree1d0072879c397873fb6ba1ca96e5c1a8068dafb1 /pcl
parentf3e9e548102b872fb4d93996373152d36104ef82 (diff)
downloadghostpdl-47b3cf18f08c7d6258b773572723b80c6405ffae.tar.gz
Fix SEGV seen in alldevs test.
gpcl6 --debug=epo-disable -sOutputFile=out%04d.tif -dTIFFDateTime=false -dMaxBitmap=400000000 -sDEVICE=tiffsep1 -r72 -Z: -dNOPAUSE -dBATCH -K2000000 -dClusterJob ../perf-testing-gpdl/pcl/j9_acrobat.pcl was crashing. This is because pxBeginPage was putting a parameter into the device which was causing it to close. The device was then not being opened again before it was being used. The fix is simply to make the code reopen the device after all the put_paramming has completed.
Diffstat (limited to 'pcl')
-rw-r--r--pcl/pxl/pxsessio.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pcl/pxl/pxsessio.c b/pcl/pxl/pxsessio.c
index 82b17f766..25bce8b95 100644
--- a/pcl/pxl/pxsessio.c
+++ b/pcl/pxl/pxsessio.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2021 Artifex Software, Inc.
+/* Copyright (C) 2001-2022 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -546,6 +546,11 @@ pxBeginPage(px_args_t * par, px_state_t * pxs)
}
#undef plist
}
+ if (!dev->is_open) {
+ code = gs_opendevice(dev);
+ if (code < 0)
+ return code;
+ }
{
code = px_initgraphics(pxs);
if (code < 0) return code;