Bug 311388 (MONO29083) - Unaligned access in handles.c
Summary: Unaligned access in handles.c
Status: RESOLVED FIXED
Alias: MONO29083
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2002-08-17 06:28 UTC by Mark Crichton
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:00:03 UTC


---- Reported by crichton@gimp.org 2002-08-16 23:28:56 MST ----

Simply put, handles.c has some code that does an unaligned access.  Patch
is attached against CVS to clean it up.


--

--- io-layer/handles.c  20 Jul 2002 10:19:39 -0000      1.20
+++ io-layer/handles.c  17 Aug 2002 03:21:45 -0000
@@ -432,6 +432,10 @@
        struct _WapiScratchHeader *hdr, *last_hdr;
        gboolean last_was_free=FALSE;
        guchar *storage=&_wapi_shared_data->scratch_base[0];
+
+       /* Ok, bytes needs to be aligned */
+       /* Aligh to 32 bits = 4 bytes */
+       bytes = (((bytes) + 3) & (~3));

 #ifdef DEBUG
        g_message (G_GNUC_PRETTY_FUNCTION



---- Additional Comments From dick@ximian.com 2002-08-20 07:09:14 MST ----

Fixed in CVS


Unknown operating system unknown. Setting to default OS "Other".