🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gnu.ghostscript.bug
1 messages
1 total messages Started by Brian McAllister Fri, 25 Sep 1992 19:58
Unaligned access errors in mem_get_bits()
#428
Author: Brian McAllister
Date: Fri, 25 Sep 1992 19:58
37 lines
1856 bytes
Ghostscript 2.5.2,  Ultrix 4.2, DS5000/200

I am getting "unaligned access errors" from gs.  I have traced the
problem to the function mem_get_bits().  Here is the call trace:
	main				gs.c:190
	(.....)
	gs_interpret			interp.c:182
	interp				interp.c:524
	zoutputpage			zdevice.c:169
	gs_output_page			gsdevice.c:88
	gdev_prn_output_page		gdevprn.c:238
	ln03_print_page			gdevln03.c:80
	sixel_printpage			gdevln03.c:146
	gdev_prn_copy_scan_lines	gdevprn.c:369
	gdev_prn_get_bits		gdevprn.c
	mem_get_bits			gdevmem1.c:180

The problem seems to be that when gdev_prn_copy_scan_lines() calls
gdev_prn_get_bits(), the "pad" argument is 0.  mem_get_bits() computes
the bytes_per_line using gs_device_raster(), and gets an odd number
(319 in this case), as its pad_to_word argument is 0.  This causes
memswab2() to be called with an odd address, leading to the unaligned
access errors.  The comment on memswab2() says "src and dest must be
16-bit aligned".  In this case, they are not.

I do not get the errors if I specify the laserjet driver, or use an X
window for display.  However, I don't see anything in
gdev_prn_copy_scan_lines() that allows it to change behavior (pad the
bytes_per_line) based on the output device.

As far as I can recall, gs2.4.1 did not exhibit this problem, and
gs2.5 did.

--
----
Brian McAllister       Internet: mcallister@mit.edu
                         BITNET: BRIAN@MITBATES
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads