Bug 695103 - Regression: seg faults starting with 41ab485d48890ecadc3d5f74657b644f9d1a8d7f
Summary: Regression: seg faults starting with 41ab485d48890ecadc3d5f74657b644f9d1a8d7f
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PXL Driver (show other bugs)
Version: master
Hardware: PC All
: P4 normal
Assignee: Hin-Tak Leung
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-21 07:08 UTC by Marcos H. Woehrmann
Modified: 2014-03-31 04:53 UTC (History)
3 users (show)

See Also:
Customer:
Word Size: ---


Attachments
020_CMYKSpot_OP_x1a.pdf (1.23 MB, application/pdf)
2014-03-21 07:08 UTC, Marcos H. Woehrmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2014-03-21 07:08:28 UTC
Created attachment 10762 [details]
020_CMYKSpot_OP_x1a.pdf

Starting with 41ab485d48890ecadc3d5f74657b644f9d1a8d7f many of the regression files seg fault with the pxlmono/pxlcolor device.  For example:

  bin/gs -o test.pxl -sDEVICE=pxlcolor ./020_CMYKSpot_OP_x1a.pdf
Comment 1 Hin-Tak Leung 2014-03-21 10:24:10 UTC
Ok, I'll look into this asap. Was afraid something like this could happen.
Comment 2 Hin-Tak Leung 2014-03-21 15:26:00 UTC
I suspect the segfault was introduced earlier, so I am splitting the fix into two halves and Chris probably needs to take the first half into gs 9.12.
Comment 3 Hin-Tak Leung 2014-03-21 15:40:14 UTC
Adding Michael to cc. Somehow image data without colorspace info arrived at the pxl driver. This seems to be due to change elsewhere since 9.10 and not a regression from my change. (just that pxl isn't checked per commit, and I ask for it this time).

I think I'll push the null color space checks in, re-assign to chris to see whether part 1 of the null check is relevant for the already forked 9.12, and after chris has finished, close, or bounce it back to support to find where the regression really is, while Michael might shed some ideas?
Comment 4 Hin-Tak Leung 2014-03-21 16:14:02 UTC
Committed the protections against null colorspace in two parts.

Re-assign to chris to check if the already forked 9.12 is affected and needs part 1 of the fix. Please re-assign back to support to find real regression commit, or Michael to comment/explain image with missing colorspace when finish.
Comment 5 Hin-Tak Leung 2014-03-21 21:41:49 UTC
Sorry about the noise - found the real cause of segfault. Was mistakenly trying to get icc info for masks. Testing better fix now. Masks don't have color space info though, so the previous fixes are valid and offers additional checks. 

Please assign back to me.
Comment 6 Hin-Tak Leung 2014-03-31 04:52:39 UTC
Fixed with 8ae4ee220766aa180150eafeffe4f094f1354f92

commit 8ae4ee220766aa180150eafeffe4f094f1354f92
Author: Hin-Tak Leung <hintak@ghostscript.com>
Date:   Sat Mar 22 04:07:14 2014 +0000

    Fixes PXL segfault with trying to set up icc transform for bitmasks, Bug 695103
    
    Masks also get treated as images (the conditionals about being masks,
    bit-depths, interpolation, etc is getting really long...), and the
    iccTranform change mistakenly try to set up link transform for such.
    There should be an additional conditional (where this change is) for
    the data not being masks. This is equivalent to not
    setting up icc tranform for missing color space info (Part 1), but clearer.
    The other two check images having valid color space info, and should stay.


553cea8ecaeba7a48837325da098583eaef5f1ca and b780ff05fd1959202b27f9c0da383968a7e398e9 were also committed earlier to stop data going down the wrong code path.