Bug 690299 - Differences with page mode vs clist
Summary: Differences with page mode vs clist
Status: RESOLVED FIXED
Alias: None
Product: GhostPCL
Classification: Unclassified
Component: PCL interpreter (show other bugs)
Version: master
Hardware: Macintosh MacOS X
: P4 normal
Assignee: Ray Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-19 22:29 UTC by Marcos H. Woehrmann
Modified: 2009-12-12 15:07 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
screenshot.png (429.55 KB, image/png)
2009-02-19 22:29 UTC, Marcos H. Woehrmann
Details
c327.mhw (706 bytes, application/octet-stream)
2009-02-19 22:30 UTC, Marcos H. Woehrmann
Details
screenshot_600.png (8.16 KB, image/png)
2009-02-20 14:52 UTC, Marcos H. Woehrmann
Details
readbit.c (991 bytes, text/plain)
2009-03-02 00:36 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 2009-02-19 22:29:29 UTC
The attached file, a small portion of one of the cluster regression test files, shows a marked difference 
when rendered in page mode vs. clist mode in 3 bit rgb mode.  In page mode the output mostly 
matches the HP P3005 output, but in clist mode it's very different.  Worse yet the clist mode output is 
non-deterministic (at least on my amd64 linux box and on the cluster).  

The command line I'm using for testing:

  ./pcl6 -r462 -sDEVICE=bitrgb -sOutputFile=test.bit ./c327.mhw

Interestingly when this file is rendered to a 24bpp device (png16m) the output is sort of similar to the 
462dpi 3 bit rgb file (the 461 dpi png16m image is identical to the 462 dpi image).
Comment 1 Marcos H. Woehrmann 2009-02-19 22:29:54 UTC
Created attachment 4803 [details]
screenshot.png
Comment 2 Marcos H. Woehrmann 2009-02-19 22:30:28 UTC
Created attachment 4804 [details]
c327.mhw
Comment 3 Ray Johnston 2009-02-20 07:08:03 UTC
Please check our output at 600 dpi. The patterning on the HP output is
suggestive of a resolution sensitive file.
Comment 4 Marcos H. Woehrmann 2009-02-20 14:52:40 UTC
Created attachment 4805 [details]
screenshot_600.png

Screenshot of 600 DPI output.

Note: as mentioned in comment #0 this is not resolution dependent, but page
mode/clist dependent.
Comment 5 Marcos H. Woehrmann 2009-02-23 18:44:04 UTC
Valgrind confirms that there is an issue with the clist:

==7969== Memcheck, a memory error detector.
==7969== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==7969== Using LibVEX rev 1732, a library for dynamic binary translation.
==7969== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==7969== Using valgrind-3.2.3-Debian, a dynamic binary instrumentation framework.
==7969== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==7969==
--7969-- Command line
--7969--    ../ghostpdl/main/obj/pcl6
--7969--    -r600
--7969--    -sDEVICE=bitrgb
--7969--    -sOutputFile=test.bit
--7969--    -dBATCH
--7969--    -dNOPAUSE
--7969--    ./c327.mhw
--7969-- Startup, with flags:
--7969--    -v
--7969-- Contents of /proc/version:
--7969--   Linux version 2.6.22-14-generic (buildd@king) (gcc version 4.1.3
20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Tue Feb 12 02:46:46 UTC 2008
--7969-- Arch and hwcaps: AMD64, amd64-sse2
--7969-- Page sizes: currently 4096, max supported 4096
--7969-- Valgrind library directory: /usr/lib/valgrind
--7969-- Reading syms from /home/marcos/artifex/ghostpdl/main/obj/pcl6 (0x400000)
--7969-- Reading syms from /lib/ld-2.6.1.so (0x4000000)
--7969-- Reading debug info from /lib/ld-2.6.1.so...
--7969-- ... CRC mismatch (computed F18656F0 wanted 247B0180)
--7969--    object doesn't have a symbol table
--7969-- Reading syms from /usr/lib/valgrind/amd64-linux/memcheck (0x38000000)
--7969--    object doesn't have a dynamic symbol table
--7969-- Reading suppressions file: /usr/lib/valgrind/default.supp
--7969-- Reading syms from /usr/lib/valgrind/amd64-linux/vgpreload_core.so
(0x4A1E000)
--7969-- Reading syms from /usr/lib/valgrind/amd64-linux/vgpreload_memcheck.so
(0x4C1F000)
--7969-- Reading syms from /usr/lib/libXt.so.6.0.0 (0x4E26000)
--7969-- Reading debug info from /usr/lib/libXt.so.6.0.0...
--7969-- ... CRC mismatch (computed C86F4B4A wanted C36502BC)
--7969--    object doesn't have a symbol table
--7969-- Reading syms from /usr/lib/libSM.so.6.0.0 (0x508A000)
--7969-- Reading debug info from /usr/lib/libSM.so.6.0.0...
--7969-- ... CRC mismatch (computed FE5D1672 wanted F24EDC81)
--7969--    object doesn't have a symbol table
--7969-- Reading syms from /usr/lib/libICE.so.6.3.0 (0x5292000)
--7969-- Reading debug info from /usr/lib/libICE.so.6.3.0...
--7969-- ... CRC mismatch (computed B442748A wanted 653255EA)
--7969--    object doesn't have a symbol table
--7969-- Reading syms from /usr/lib/libXext.so.6.4.0 (0x54AE000)
--7969-- Reading debug info from /usr/lib/libXext.so.6.4.0...
--7969-- ... CRC mismatch (computed 749303DD wanted 14C9F19C)
--7969--    object doesn't have a symbol table
--7969-- Reading syms from /usr/lib/libX11.so.6.2.0 (0x56BF000)
--7969-- Reading debug info from /usr/lib/libX11.so.6.2.0...
--7969-- ... CRC mismatch (computed D0C3B4E2 wanted 2E1CF379)
--7969--    object doesn't have a symbol table
--7969-- Reading syms from /lib/libm-2.6.1.so (0x59D0000)
--7969-- Reading debug info from /lib/libm-2.6.1.so...
--7969-- ... CRC mismatch (computed E61D9D34 wanted 6FCE695E)
--7969--    object doesn't have a symbol table
--7969-- Reading syms from /lib/libpthread-2.6.1.so (0x5C51000)
--7969-- Reading debug info from /lib/libpthread-2.6.1.so...
--7969-- ... CRC mismatch (computed 84400106 wanted 8DE3D5D7)
--7969-- Reading syms from /lib/libdl-2.6.1.so (0x5E6C000)
--7969-- Reading debug info from /lib/libdl-2.6.1.so...
--7969-- ... CRC mismatch (computed 5575B95A wanted E6BCEC4F)
--7969--    object doesn't have a symbol table
--7969-- Reading syms from /lib/libc-2.6.1.so (0x6070000)
--7969-- Reading debug info from /lib/libc-2.6.1.so...
--7969-- ... CRC mismatch (computed C5B5C357 wanted 602D23C5)
--7969--    object doesn't have a symbol table
--7969-- Reading syms from /usr/lib/libXau.so.6.0.0 (0x63CB000)
--7969-- Reading debug info from /usr/lib/libXau.so.6.0.0...
--7969-- ... CRC mismatch (computed F6128D91 wanted 5BB2FA57)
--7969--    object doesn't have a symbol table
--7969-- Reading syms from /usr/lib/libXdmcp.so.6.0.0 (0x65CD000)
--7969-- Reading debug info from /usr/lib/libXdmcp.so.6.0.0...
--7969-- ... CRC mismatch (computed 2ACD0E34 wanted 8C2B8DA1)
--7969--    object doesn't have a symbol table
--7969-- REDIR: 0x60E9D90 (memset) redirected to 0x4C22CA0 (memset)
--7969-- REDIR: 0x60E8F30 (rindex) redirected to 0x4C22840 (rindex)
--7969-- REDIR: 0x60E3D90 (malloc) redirected to 0x4C21B94 (malloc)
--7969-- REDIR: 0x60EA8A0 (memcpy) redirected to 0x4C23770 (memcpy)
--7969-- REDIR: 0x60E8E80 (strncpy) redirected to 0x4C23010 (strncpy)
--7969-- REDIR: 0x60E8B20 (strlen) redirected to 0x4C229F0 (strlen)
--7969-- REDIR: 0x60E85F0 (strcpy) redirected to 0x4C239D0 (strcpy)
--7969-- REDIR: 0x60E8240 (strcat) redirected to 0x4C23AB0 (strcat)
--7969-- REDIR: 0x60E5670 (free) redirected to 0x4C217A4 (free)
--7969-- REDIR: 0x60E9C00 (memmove) redirected to 0x4C22CD0 (memmove)
--7969-- REDIR: 0x60E85B0 (strcmp) redirected to 0x4C22AC0 (strcmp)
--7969-- REDIR: 0x60E9760 (bcmp) redirected to 0x4C22C00 (bcmp)
--7969-- REDIR: 0x60EB540 (rawmemchr) redirected to 0x4C22D60 (rawmemchr)
--7969-- REDIR: 0x60E8400 (index) redirected to 0x4C22930 (index)
--7969-- REDIR: 0x60E8DA0 (strncmp) redirected to 0x4C22A50 (strncmp)
--7969-- REDIR: 0x60E3A30 (calloc) redirected to 0x4C20EB9 (calloc)
==7969== Source and destination overlap in strcpy(0x7FEFFEB20, 0x7FEFFEB20)
==7969==    at 0x4C23A84: strcpy (mc_replace_strmem.c:106)
==7969==    by 0x7671F6: pl_load_built_in_fonts (pllfont.c:246)
==7969==    by 0x75963C: pxBeginSession (pxsessio.c:287)
==7969==    by 0x4064D1: px_top_init (pxtop.c:682)
==7969==    by 0x4056C7: px_stream_header_process (pxtop.c:106)
==7969==    by 0x405D24: pxl_impl_process (pxtop.c:406)
==7969==    by 0x75DFC5: pl_process (pltop.c:148)
==7969==    by 0x7B31B5: pl_main (plmain.c:400)
==7969==    by 0x7B542D: main (plmain.c:1279)
--7969-- REDIR: 0x60E9640 (memchr) redirected to 0x4C22B80 (memchr)
--7969-- REDIR: 0x60E9EA0 (mempcpy) redirected to 0x4C23250 (mempcpy)
==7969==
==7969== Conditional jump or move depends on uninitialised value(s)
==7969==    at 0x6D66E5: gx_hld_get_gstate_ptr (gxhldevc.c:50)
==7969==    by 0x6D69CE: gx_hld_is_hl_color_available (gxhldevc.c:142)
==7969==    by 0x725D2F: gx_default_fillpage (gdevddrw.c:954)
==7969==    by 0x51DC59: clist_playback_band (gxclrast.c:1968)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==
==7969== Conditional jump or move depends on uninitialised value(s)
==7969==    at 0x51A093: clist_playback_band (gxclrast.c:1077)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==    by 0x511643: gx_default_print_page_copies (gdevprn.c:834)
==7969==    by 0x511351: gdev_prn_output_page (gdevprn.c:769)
==7969==    by 0x685D44: gs_output_page (gsdevice.c:134)
==7969==
==7969== Conditional jump or move depends on uninitialised value(s)
==7969==    at 0x51A10B: clist_playback_band (gxclrast.c:1088)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==    by 0x511643: gx_default_print_page_copies (gdevprn.c:834)
==7969==    by 0x511351: gdev_prn_output_page (gdevprn.c:769)
==7969==    by 0x685D44: gs_output_page (gsdevice.c:134)
==7969==
==7969== Invalid read of size 1
==7969==    at 0x429BD6: mem_gray8_rgb24_strip_copy_rop (gdevmr8n.c:315)
==7969==    by 0x4268F4: mem_default_strip_copy_rop (gdevdrop.c:543)
==7969==    by 0x4281B0: mem_gray_strip_copy_rop (gdevmr2n.c:100)
==7969==    by 0x51DE68: clist_playback_band (gxclrast.c:1986)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==  Address 0x746AA5C is not stack'd, malloc'd or (recently) free'd
==7969==
==7969== Invalid read of size 1
==7969==    at 0x429BEC: mem_gray8_rgb24_strip_copy_rop (gdevmr8n.c:315)
==7969==    by 0x4268F4: mem_default_strip_copy_rop (gdevdrop.c:543)
==7969==    by 0x4281B0: mem_gray_strip_copy_rop (gdevmr2n.c:100)
==7969==    by 0x51DE68: clist_playback_band (gxclrast.c:1986)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==  Address 0x746AA5D is not stack'd, malloc'd or (recently) free'd
==7969==
==7969== Invalid read of size 1
==7969==    at 0x429C02: mem_gray8_rgb24_strip_copy_rop (gdevmr8n.c:315)
==7969==    by 0x4268F4: mem_default_strip_copy_rop (gdevdrop.c:543)
==7969==    by 0x4281B0: mem_gray_strip_copy_rop (gdevmr2n.c:100)
==7969==    by 0x51DE68: clist_playback_band (gxclrast.c:1986)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==  Address 0x746AA5E is not stack'd, malloc'd or (recently) free'd
==7969==
==7969== Conditional jump or move depends on uninitialised value(s)
==7969==    at 0x429CE9: mem_gray8_rgb24_strip_copy_rop (gdevmr8n.c:319)
==7969==    by 0x4268F4: mem_default_strip_copy_rop (gdevdrop.c:543)
==7969==    by 0x4281B0: mem_gray_strip_copy_rop (gdevmr2n.c:100)
==7969==    by 0x51DE68: clist_playback_band (gxclrast.c:1986)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==
==7969== Conditional jump or move depends on uninitialised value(s)
==7969==    at 0x425A72: pack_from_standard (gdevdrop.c:304)
==7969==    by 0x426999: mem_default_strip_copy_rop (gdevdrop.c:561)
==7969==    by 0x4281B0: mem_gray_strip_copy_rop (gdevmr2n.c:100)
==7969==    by 0x51DE68: clist_playback_band (gxclrast.c:1986)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==
==7969== Syscall param write(buf) points to uninitialised byte(s)
==7969==    at 0x6135D8B: write (in /lib/libc-2.6.1.so)
==7969==    by 0x60DBAE2: _IO_file_write (in /lib/libc-2.6.1.so)
==7969==    by 0x60DB748: (within /lib/libc-2.6.1.so)
==7969==    by 0x60DBA83: _IO_do_write (in /lib/libc-2.6.1.so)
==7969==    by 0x60DB939: _IO_file_xsputn (in /lib/libc-2.6.1.so)
==7969==    by 0x60D1DBA: fwrite (in /lib/libc-2.6.1.so)
==7969==    by 0x557487: bit_print_page (gdevbit.c:688)
==7969==    by 0x511643: gx_default_print_page_copies (gdevprn.c:834)
==7969==    by 0x511351: gdev_prn_output_page (gdevprn.c:769)
==7969==    by 0x685D44: gs_output_page (gsdevice.c:134)
==7969==    by 0x4063C7: pxl_end_page_top (pxtop.c:622)
==7969==    by 0x75B435: pxEndPage (pxsessio.c:761)
==7969==  Address 0x40214DA is not stack'd, malloc'd or (recently) free'd
Recovered 73e9f80 size 104 1342'th allocation client gs_cspace_alloc_with_id
Recovered 73c2f20 size 104 1314'th allocation client gs_cspace_alloc_with_id
Recovered 76a50a8 size 100001 1262'th allocation client char cache chunk(data)
Recovered 41304e0 size 24 1261'th allocation client char cache chunk
Recovered 407e350 size 24 138'th allocation client initial_chunk
Recovered 406e2c0 size 65536 137'th allocation client font_dir_alloc(chars)
Recovered 4068ab0 size 22400 136'th allocation client font_dir_alloc(mdata)
Recovered 4068940 size 224 135'th allocation client font_dir_alloc(dir)
Recovered 4066fa0 size 40 128'th allocation client gs_state_alloc(view_clip)
Recovered 4066eb0 size 96 127'th allocation client gs_state_alloc(view_clip)
Recovered 4066cc0 size 352 126'th allocation client gs_state_alloc(view_clip)
Recovered 4065c98 size 40 114'th allocation client gstate_alloc_parts(clip_path)
Recovered 4065ba8 size 96 113'th allocation client gstate_alloc_parts(clip_path)
Recovered 40659b8 size 352 112'th allocation client gstate_alloc_parts(clip_path)
Recovered 4065900 size 40 111'th allocation client gstate_alloc_parts(path)
Recovered 40657d8 size 152 110'th allocation client gstate_alloc_parts(path)
Recovered 4062158 size 40 101'th allocation client gs_state_alloc(view_clip)
Recovered 4062068 size 96 100'th allocation client gs_state_alloc(view_clip)
Recovered 4061e78 size 352 99'th allocation client gs_state_alloc(view_clip)
Recovered 4060e50 size 40 87'th allocation client gstate_alloc_parts(clip_path)
Recovered 4060d60 size 96 86'th allocation client gstate_alloc_parts(clip_path)
Recovered 4060b70 size 352 85'th allocation client gstate_alloc_parts(clip_path)
Recovered 4060ab8 size 40 84'th allocation client gstate_alloc_parts(path)
Recovered 4060990 size 152 83'th allocation client gstate_alloc_parts(path)
Recovered 403a650 size 128 7'th allocation client gs_iodev_init(iodev)
Recovered 403a540 size 128 6'th allocation client gs_iodev_init(iodev)
Recovered 403a430 size 128 5'th allocation client gs_iodev_init(iodev)
Recovered 403a320 size 128 4'th allocation client gs_iodev_init(iodev)
Recovered 403a210 size 128 3'th allocation client gs_iodev_init(iodev)
Recovered 403a158 size 40 2'th allocation client gs_iodev_init(table)
Recovered 30 blocks, 191433 bytes
==7969==
==7969== ERROR SUMMARY: 316678 errors from 10 contexts (suppressed: 8 from 1)
==7969==
==7969== 1 errors in context 1 of 10:
==7969== Syscall param write(buf) points to uninitialised byte(s)
==7969==    at 0x6135D8B: write (in /lib/libc-2.6.1.so)
==7969==    by 0x60DBAE2: _IO_file_write (in /lib/libc-2.6.1.so)
==7969==    by 0x60DB748: (within /lib/libc-2.6.1.so)
==7969==    by 0x60DBA83: _IO_do_write (in /lib/libc-2.6.1.so)
==7969==    by 0x60DB939: _IO_file_xsputn (in /lib/libc-2.6.1.so)
==7969==    by 0x60D1DBA: fwrite (in /lib/libc-2.6.1.so)
==7969==    by 0x557487: bit_print_page (gdevbit.c:688)
==7969==    by 0x511643: gx_default_print_page_copies (gdevprn.c:834)
==7969==    by 0x511351: gdev_prn_output_page (gdevprn.c:769)
==7969==    by 0x685D44: gs_output_page (gsdevice.c:134)
==7969==    by 0x4063C7: pxl_end_page_top (pxtop.c:622)
==7969==    by 0x75B435: pxEndPage (pxsessio.c:761)
==7969==  Address 0x40214DA is not stack'd, malloc'd or (recently) free'd
==7969==
==7969== 1 errors in context 2 of 10:
==7969== Conditional jump or move depends on uninitialised value(s)
==7969==    at 0x51A10B: clist_playback_band (gxclrast.c:1088)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==    by 0x511643: gx_default_print_page_copies (gdevprn.c:834)
==7969==    by 0x511351: gdev_prn_output_page (gdevprn.c:769)
==7969==    by 0x685D44: gs_output_page (gsdevice.c:134)
==7969==
==7969== 1 errors in context 3 of 10:
==7969== Conditional jump or move depends on uninitialised value(s)
==7969==    at 0x51A093: clist_playback_band (gxclrast.c:1077)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==    by 0x511643: gx_default_print_page_copies (gdevprn.c:834)
==7969==    by 0x511351: gdev_prn_output_page (gdevprn.c:769)
==7969==    by 0x685D44: gs_output_page (gsdevice.c:134)
==7969==
==7969== 1 errors in context 4 of 10:
==7969== Source and destination overlap in strcpy(0x7FEFFEB20, 0x7FEFFEB20)
==7969==    at 0x4C23A84: strcpy (mc_replace_strmem.c:106)
==7969==    by 0x7671F6: pl_load_built_in_fonts (pllfont.c:246)
==7969==    by 0x75963C: pxBeginSession (pxsessio.c:287)
==7969==    by 0x4064D1: px_top_init (pxtop.c:682)
==7969==    by 0x4056C7: px_stream_header_process (pxtop.c:106)
==7969==    by 0x405D24: pxl_impl_process (pxtop.c:406)
==7969==    by 0x75DFC5: pl_process (pltop.c:148)
==7969==    by 0x7B31B5: pl_main (plmain.c:400)
==7969==    by 0x7B542D: main (plmain.c:1279)
==7969==
==7969== 12 errors in context 5 of 10:
==7969== Conditional jump or move depends on uninitialised value(s)
==7969==    at 0x6D66E5: gx_hld_get_gstate_ptr (gxhldevc.c:50)
==7969==    by 0x6D69CE: gx_hld_is_hl_color_available (gxhldevc.c:142)
==7969==    by 0x725D2F: gx_default_fillpage (gdevddrw.c:954)
==7969==    by 0x51DC59: clist_playback_band (gxclrast.c:1968)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==
==7969== 37 errors in context 6 of 10:
==7969== Conditional jump or move depends on uninitialised value(s)
==7969==    at 0x425A72: pack_from_standard (gdevdrop.c:304)
==7969==    by 0x426999: mem_default_strip_copy_rop (gdevdrop.c:561)
==7969==    by 0x4281B0: mem_gray_strip_copy_rop (gdevmr2n.c:100)
==7969==    by 0x51DE68: clist_playback_band (gxclrast.c:1986)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==
==7969== 44 errors in context 7 of 10:
==7969== Conditional jump or move depends on uninitialised value(s)
==7969==    at 0x429CE9: mem_gray8_rgb24_strip_copy_rop (gdevmr8n.c:319)
==7969==    by 0x4268F4: mem_default_strip_copy_rop (gdevdrop.c:543)
==7969==    by 0x4281B0: mem_gray_strip_copy_rop (gdevmr2n.c:100)
==7969==    by 0x51DE68: clist_playback_band (gxclrast.c:1986)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==
==7969== 105525 errors in context 8 of 10:
==7969== Invalid read of size 1
==7969==    at 0x429BEC: mem_gray8_rgb24_strip_copy_rop (gdevmr8n.c:315)
==7969==    by 0x4268F4: mem_default_strip_copy_rop (gdevdrop.c:543)
==7969==    by 0x4281B0: mem_gray_strip_copy_rop (gdevmr2n.c:100)
==7969==    by 0x51DE68: clist_playback_band (gxclrast.c:1986)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==  Address 0x746AA5D is not stack'd, malloc'd or (recently) free'd
==7969==
==7969== 105527 errors in context 9 of 10:
==7969== Invalid read of size 1
==7969==    at 0x429BD6: mem_gray8_rgb24_strip_copy_rop (gdevmr8n.c:315)
==7969==    by 0x4268F4: mem_default_strip_copy_rop (gdevdrop.c:543)
==7969==    by 0x4281B0: mem_gray_strip_copy_rop (gdevmr2n.c:100)
==7969==    by 0x51DE68: clist_playback_band (gxclrast.c:1986)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==  Address 0x746AA5C is not stack'd, malloc'd or (recently) free'd
==7969==
==7969== 105529 errors in context 10 of 10:
==7969== Invalid read of size 1
==7969==    at 0x429C02: mem_gray8_rgb24_strip_copy_rop (gdevmr8n.c:315)
==7969==    by 0x4268F4: mem_default_strip_copy_rop (gdevdrop.c:543)
==7969==    by 0x4281B0: mem_gray_strip_copy_rop (gdevmr2n.c:100)
==7969==    by 0x51DE68: clist_playback_band (gxclrast.c:1986)
==7969==    by 0x5246FC: clist_playback_file_bands (gxclread.c:698)
==7969==    by 0x5242BC: clist_render_rectangle (gxclread.c:627)
==7969==    by 0x523F28: clist_rasterize_lines (gxclread.c:539)
==7969==    by 0x523A19: clist_get_bits_rectangle (gxclread.c:430)
==7969==    by 0x53E6E6: clist_get_bits_rect_mt (gxclthrd.c:472)
==7969==    by 0x728421: gx_default_get_bits (gdevdgbr.c:51)
==7969==    by 0x5125E2: gdev_prn_get_bits (gdevprn.c:1227)
==7969==    by 0x557469: bit_print_page (gdevbit.c:686)
==7969==  Address 0x746AA5E is not stack'd, malloc'd or (recently) free'd
--7969--
--7969-- supp:    8 dl-hack3
==7969==
==7969== IN SUMMARY: 316678 errors from 10 contexts (suppressed: 8 from 1)
==7969==
==7969== malloc/free: in use at exit: 184 bytes in 2 blocks.
==7969== malloc/free: 33,927 allocs, 33,925 frees, 77,345,556 bytes allocated.
==7969==
==7969== searching for pointers to 2 not-freed blocks.
==7969== checked 453,080 bytes.
==7969==
==7969== LEAK SUMMARY:
==7969==    definitely lost: 32 bytes in 1 blocks.
==7969==      possibly lost: 152 bytes in 1 blocks.
==7969==    still reachable: 0 bytes in 0 blocks.
==7969==         suppressed: 0 bytes in 0 blocks.
==7969== Rerun with --leak-check=full to see details of leaked memory.
--7969--  memcheck: sanity checks: 856 cheap, 35 expensive
--7969--  memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--7969--  memcheck: auxmaps: 0 searches, 0 comparisons
--7969--  memcheck: SMs: n_issued      = 621 (9936k, 9M)
--7969--  memcheck: SMs: n_deissued    = 456 (7296k, 7M)
--7969--  memcheck: SMs: max_noaccess  = 524287 (8388592k, 8191M)
--7969--  memcheck: SMs: max_undefined = 89 (1424k, 1M)
--7969--  memcheck: SMs: max_defined   = 677 (10832k, 10M)
--7969--  memcheck: SMs: max_non_DSM   = 308 (4928k, 4M)
--7969--  memcheck: max sec V bit nodes:    15 (1k, 0M)
--7969--  memcheck: set_sec_vbits8 calls: 52 (new: 15, updates: 37)
--7969--  memcheck: max shadow mem size:   9073k, 8M
--7969-- translate:            fast SP updates identified: 24,813 ( 86.5%)
--7969-- translate:   generic_known SP updates identified: 2,377 (  8.2%)
--7969-- translate: generic_unknown SP updates identified: 1,491 (  5.1%)
--7969--     tt/tc: 103,743 tt lookups requiring 112,768 probes
--7969--     tt/tc: 103,743 fast-cache updates, 2 flushes
--7969--  transtab: new        16,613 (581,696 -> 10,432,134; ratio 179:10) [0 scs]
--7969--  transtab: dumped     0 (0 -> ??)
--7969--  transtab: discarded  0 (0 -> ??)
--7969-- scheduler: 85,687,802 jumps (bb entries).
--7969-- scheduler: 856/3,097,745 major/minor sched events.
--7969--    sanity: 857 cheap, 35 expensive checks.
--7969--    exectx: 30,011 lists, 1,413 contexts (avg 0 per list)
--7969--    exectx: 384,538 searches, 383,165 full compares (996 per 1000)
--7969--    exectx: 0 cmp2, 949,893 cmp4, 0 cmpAll
                                                                               
                    
Comment 6 Ray Johnston 2009-02-26 09:55:27 UTC
I added a fix for the gx_hld_get_gstate_ptr to prevent at least one of the
UMR issues related to clist. Marcos reports that this problem is not fixed.
Comment 7 Henry Stiles 2009-02-26 16:53:39 UTC
FWIW I was able to produce consecutive runs with different result without
banding (-r72, default).
Comment 8 Marcos H. Woehrmann 2009-02-28 11:21:46 UTC
I'm not able to reproduce comment #7.   Using r9475 I ran 1000 iterations on both my iMac and my 
amd64 Linux box and all have identical md5 checksums.  Here's my command line:

../ghostpdl/main/obj/pcl6 -r72 -sDEVICE=bitrgb -sOutputFile=test.bit -dBATCH -dNOPAUSE ./c327.bin

Please provide the command line and the type of operating system/computer you are using in comment 
#7.
Comment 9 Henry Stiles 2009-03-01 17:06:54 UTC
ubuntu 8.0 on vmware fusion on mac book pro with 10.5.6


henrys@meerkat:~/ghostpdl2$ main/obj/pcl6 -n -r72 -dNOPAUSE -sDEVICE=bitrgb
-sOutputFile="|md5sum" /mnt/hgfs/henrys/xl/pcl6cet/c327.bin 
0db106fd9f713192857d1567c09c82d2  -
henrys@meerkat:~/ghostpdl2$ main/obj/pcl6 -n -r72 -dNOPAUSE -sDEVICE=bitrgb
-sOutputFile="|md5sum" /mnt/hgfs/henrys/xl/pcl6cet/c327.bin 
c3a5c0f3f7e7594e872abd9f4fd6f574  -
henrys@meerkat:~/ghostpdl2$ main/obj/pcl6 -n -r72 -dNOPAUSE -sDEVICE=bitrgb
-sOutputFile="|md5sum" /mnt/hgfs/henrys/xl/pcl6cet/c327.bin 
6d23094529a5feb0ad7084c2dd9c51da  -
Comment 10 Marcos H. Woehrmann 2009-03-01 19:42:46 UTC
There two independent problems; when us -sOuputFile="|md5sum" I also get different results for each 
run.  However this isn't the issue that this bug is reporting.  Please try the command line in comment 
#0  to see if the output is deterministic:

marcos@amd64:[38]% ~/artifex/ghostpdl/main/obj/pcl6 -r72 -dNOPAUSE -sDEVICE=bitrgb -
sOutputFile=test1.rgb ./c327.bin
marcos@amd64:[39]% ~/artifex/ghostpdl/main/obj/pcl6 -r72 -dNOPAUSE -sDEVICE=bitrgb -
sOutputFile=test2.rgb ./c327.bin
marcos@amd64:[40]% md5sum test1.rgb
428bf7de569a3e8ff7879c7e2283a567  test1.rgb
marcos@amd64:[41]% md5sum test2.rgb
428bf7de569a3e8ff7879c7e2283a567  test2.rgb
Comment 11 Henry Stiles 2009-03-01 20:43:27 UTC
You should get different output results if md5sum is different, I don't
understand, repeating the command in comment #9 with output files:

henrys@meerkat:~/ghostpdl2$ main/obj/pcl6 -n -r72 -dNOPAUSE -sDEVICE=bitrgb
-sOutputFile=test.bit /mnt/hgfs/henrys/xl/pcl6cet/c327.bin 

henrys@meerkat:~/ghostpdl2$ main/obj/pcl6 -n -r72 -dNOPAUSE -sDEVICE=bitrgb
-sOutputFile=test2.bit /mnt/hgfs/henrys/xl/pcl6cet/c327.bin 
henrys@meerkat:~/ghostpdl2$ cmp test.bit test2.bit
test.bit test2.bit differ: byte 6640286, line 1
henrys@meerkat:~/ghostpdl2$ cmp -l test.bit test2.bit
6640286 161 167
6640296  20 160
6640298   6   4
6640305 161 167
6640308 140 100
6640315  20 160
6640317   6   4
6844788 166 165
6845085 163 162
6845086  27 127
6845089 160 164
6845090 107  47
6845093 161 165
6845094 106  45
6849981 161 160
6849982   7 107
6849990   2   1
6850287 163 162
6850288  27 127
6850295 160 164
6850296 102  41
6850602 166 165
6850908 166 165
6855804 162 161
6855805  20   4
6855806 100  40
6855814  41  20
6855815   4 102
6856110 162 161
6856111  61  45
6856112 100  40
6856118  41  20
6856119   4 102
6856120  43  22
6856121  24 122
6856416 166 165
6856417  61  45
6856418 100  40
6856422  41  20
6856423   4 102
6856424  43  22
6856425  24 122
6856426 143 122
6856427  24 122
6856722 166 165
6856723  61  45
6856724 100  40
6856726  41  20
6856727   4 102
6856728  43  22
6856729  24 122
6856730 143 122
6856731  24 122
6856732 143 122
6856733  24 122
henrys@meerkat:~/ghostpdl2$ 



Similarly for the command in comment #0 I get a different md5sum and the output
files differ with cmp -l.  The cmp -l output is long, let me know if you need it.

Comment 12 Henry Stiles 2009-03-01 20:49:48 UTC
BTW, Marcos, how do you visualize bitrgb output?  I use viewcmyk.ps for bitcmyk,
we don't seem to have anything for bitrgb and imagemagick raw doesn't work for
me, do you have something from Handmade?
Comment 13 Marcos H. Woehrmann 2009-03-01 23:02:25 UTC
This is getting stranger and stranger.

On my MacBook Pro running Ubuntu 8.10 under VMWare Fusion I get the same results as Henry:
using -sOutputFile ="test.rgb" or -sOutputFile ="|md5sum" I get different output with every run @ 72 
dpi.

On my Amd64 box running Ubuntu 7.10 I get the different results for every run using -sOutputFile ="|mdsum", but with -sOutputFile ="test.rgb" the results are the same every time.

Furthermore, on my Amd64 box changing from -sDEVICE=bitrgb to -sDEVICE=bitcmyk makes the 
output identical even with -sOutputFile ="|mdsum".  This is not the case on the MacBook Pro. 

Finally, on casper bitrgb output acts like the MacBook Pro/VMWare/Ubuntu, different results with 
|md5sum and test.rgb, but with bitcmyk the output is identical with both.
Comment 14 Ralph Giles 2009-03-02 00:20:40 UTC
So it's a 32-bit only issue? latest ubuntu has a different gcc version from
7.10, but casper is even older.
Comment 15 Marcos H. Woehrmann 2009-03-02 00:32:46 UTC
It definitely seems as if 32/64 bit is part of the difference.  But I've decided to look into why on my amd64 
linux box piped output is not deterministic at 72 dpi whereas writing to a file is.  
Comment 16 Marcos H. Woehrmann 2009-03-02 00:36:50 UTC
Created attachment 4821 [details]
readbit.c

Regarding comment #12:	I wrote a trivial program (attached) that reads bitrgb
files and writes ppmraw files.	It's biggest limitation is that it only
supports 8.5 x 11 files.
Comment 17 Ray Johnston 2009-03-02 10:50:07 UTC
Note that I just committed lib/viewrgb.ps (rev 9516) that works to display the
images created by the bitrgb device. As with viewcmyk it accepts a 'width'
parameter and also -dBITS=# (default=1) can be used to display other bit depths.

Note that due to the format/packing of the values, only 1, 2 and 8 BITS per
component are supported (corresponding to -dGrayValues=2 (default) -dGrayValues=4
and -dGrayValues=256)
Comment 18 Henry Stiles 2009-09-21 12:06:54 UTC
It has taken an eternity simply to find the area of interest with this one. 
There is definitely an incompatibility between the texture rendering code and
how clist tiles are split up if the texture does not fit in a tile.  There are
several workarounds, for example setting the tile size to be sufficient size or
not replicating y in clist_new_tile_params as follows:

Index: base/gxclbits.c
===================================================================
--- base/gxclbits.c	(revision 10057)
+++ base/gxclbits.c	(working copy)
@@ -536,7 +536,7 @@
 	    reps_x >>= 1;
 	new_tile->size.x = max(reps_x, 1) * rep_width;
 	new_tile->raster = bitmap_raster(new_tile->size.x * depth);
-	if (tiles->shift != 0)
+	if (1 /* tiles->shift != 0 */)
 	    reps_y = 1;
 	else {
 	    reps_y = max_bytes / (new_tile->raster * rep_height);

This is properly Ray's area of the code so I'll discuss it with him when he gets
back, I don't understand the invariants here, in particular how y can be
replicated.  The original tile was 60 x 60 (c327.mhw) which doesn't fit, this
was reduced to 60 x 1 (1 scan line) then the clist_new_tile_params attempts to
replicate the single scan line, which doesn't seem to make sense.  I imagine the
replication code was not designed to work with the fallback case, where the tile
is reduced to a single scanline.  The code to fallback to a single scanline is
in gxclrect.c preceded by this comment:

		    if (code < 0) {
			/*
			 * The error is a limitcheck: we have a tile that
			 * is too big to fit in the command reading buffer.
			 * For now, just divide up the transfer into scan
			 * lines.  (If a single scan line won't fit, punt.)
			 * Eventually, we'll need a way to transfer the tile
			 * in pieces.
			 */
Comment 19 Henry Stiles 2009-12-04 09:06:19 UTC
Reassigning to clist owner.  I believe the regularly seen pcl indeterminisms in
the regression report are related to this problem, so it would be nice to fix it. 
Comment 20 Ray Johnston 2009-12-12 15:07:28 UTC
Caused by RasterOp texture rendering from uninitialized memory (past end of
buffer) when the texture was 'expanded' and the source texture had repetitions
in y.

The expansion was only needed if the device color space was RGB, but not 8 bit.

This doesn't really give valid output anyway for RasterOps, but at least
we no longer reference past buffer bounds (see the 'trow' calculation in
gdevmr8n.c).

Fixed in rev 10497.