Bug 688914

Summary: Valgrind: Uninitialised data in smooth shading
Product: Ghostscript Reporter: Alex Cherepanov <alex>
Component: PDF WriterAssignee: Alex Cherepanov <alex>
Status: NOTIFIED FIXED    
Severity: normal CC: leonardo
Priority: P4    
Version: master   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: patch

Description Alex Cherepanov 2006-09-24 04:46:22 UTC
File: 483-01.ps - pdfwrite

Conditional jump or move depends on uninitialised value(s)
   at 0x8257E31: gs_point_transform2fixed (gsmatrix.c:401)
   by 0x810BB3D: shade_next_coords (gxshade.c:224)
   by 0x8206DA1: put_float_mesh_data (gdevpdfv.c:665)
   by 0x82072F9: pdf_put_mesh_shading (gdevpdfv.c:807)
   by 0x8207686: pdf_put_pattern2 (gdevpdfv.c:916)
   by 0x81F0D82: pdf_reset_color (gdevpdfg.c:431)
   by 0x81F0ED2: pdf_set_drawing_color (gdevpdfg.c:462)
   by 0x81EA392: pdf_setfillcolor (gdevpdfd.c:103)
   by 0x81EC4C8: gdev_pdf_fill_path (gdevpdfd.c:1094)
   by 0x828B8B3: gx_fill_path (gxpaint.c:49)
   by 0x8108C42: gs_shfill (gscolor3.c:85)
   by 0x8125FE4: zshfill (zshade.c:77)
Comment 1 Alex Cherepanov 2007-03-25 05:45:58 UTC
Confirmed in v. 8.57 by Valgrind 3.2.3 but
not detected by Purify 7
Comment 2 Alex Cherepanov 2007-08-15 20:22:57 UTC
Created attachment 3288 [details]
patch

Add missing initialization of txy_fixed_valid field.
Since the fixed coordinates are valid, the patch eliminates possible 
re-calculation of the fixed coordinates, but doesn't affect the end result.

Regression testing shows no differences.
Comment 3 Alex Cherepanov 2007-08-15 20:25:08 UTC
*** Bug 688917 has been marked as a duplicate of this bug. ***
Comment 4 leonardo 2007-08-16 09:49:30 UTC
The patch is good, please commit or let me know if you want me to do. My 
Internet connction is instable.
Comment 5 Alex Cherepanov 2007-08-17 05:56:26 UTC
*** Bug 688904 has been marked as a duplicate of this bug. ***
Comment 6 Alex Cherepanov 2007-08-17 06:03:06 UTC
The patch is committed as a rev. 8193.