[gs-commits] rev 10949 - branches/icc_work/psi

mvrhel at ghostscript.com mvrhel at ghostscript.com
Fri Mar 19 20:38:56 UTC 2010


Author: mvrhel
Date: 2010-03-19 20:38:55 +0000 (Fri, 19 Mar 2010)
New Revision: 10949

Modified:
   branches/icc_work/psi/zcie.c
Log:
Creation of ps color spaces in stable memory since they are currently cached and should not be freed with a gstate restore.  This will change when I do a fix to only cache the profile and not the color space, but for now this fix avoids the seg faults that have cropped up in the PS test files that have PS color spaces.

Modified: branches/icc_work/psi/zcie.c
===================================================================
--- branches/icc_work/psi/zcie.c	2010-03-19 19:24:25 UTC (rev 10948)
+++ branches/icc_work/psi/zcie.c	2010-03-19 20:38:55 UTC (rev 10949)
@@ -449,7 +449,8 @@
         check_read_type(*ptref, t_array);
         if (r_size(ptref) != 5)
 	    return_error(e_rangecheck);
-        code = gs_cspace_build_CIEDEFG(&pcs, NULL, mem);
+        /* Stable memory due to current caching of color space */
+        code = gs_cspace_build_CIEDEFG(&pcs, NULL, mem->stable_memory);
         if (code < 0)
 	    return code;
         pcie = pcs->params.defg;
@@ -545,7 +546,8 @@
         check_read_type(*ptref, t_array);
         if (r_size(ptref) != 4)
 	    return_error(e_rangecheck);
-        code = gs_cspace_build_CIEDEF(&pcs, NULL, mem);
+        /* Stable memory due to current caching of color space */
+        code = gs_cspace_build_CIEDEF(&pcs, NULL, mem->stable_memory);
         if (code < 0)
 	    return code;
         pcie = pcs->params.def;
@@ -594,7 +596,8 @@
     push(1); /* Sacrificial */
     procs = istate->colorspace.procs.cie;
     if (pcs == NULL ) {
-        code = gs_cspace_build_CIEABC(&pcs, NULL, mem);
+        /* Stable memory due to current caching of color space */
+        code = gs_cspace_build_CIEABC(&pcs, NULL, mem->stable_memory);
         if (code < 0)
 	    return code;
         pcie = pcs->params.abc;
@@ -645,7 +648,8 @@
     push(1); /* Sacrificial */
     procs = istate->colorspace.procs.cie;
     if (pcs == NULL ) {
-        code = gs_cspace_build_CIEA(&pcs, NULL, mem);
+        /* Stable memory due to current caching of color space */
+        code = gs_cspace_build_CIEA(&pcs, NULL, mem->stable_memory);
         if (code < 0)
 	    return code;
         pcie = pcs->params.a;



More information about the gs-commits mailing list