tags 322972 patch
thanks

Hi,

I was able to track this bug to line 198 in src/runtime/fmisc.r:

   dst->table.defvalue = src->table.defvalue;

Assembly code generated for this line attempts to copy the defvalue structure by doing a single double-word load and store, even though the defvalue structure is only aligned on a word-boundary. This causes an unaligned trap resulting in the bus error. Tracking the problem down is rather tricky, however the quick-and-dirty solution is to replace this line by an explicit memcpy(). Attached patch implements this change, with it icon builds successfully, passing all the tests.

Best regards,

Jurij Smakov                                        [EMAIL PROTECTED]
Key: http://www.wooyd.org/pgpkey/                   KeyID: C99E03CC
diff -aur a/src/runtime/fmisc.r b/src/runtime/fmisc.r
--- a/src/runtime/fmisc.r       2002-07-10 09:49:39.000000000 -0700
+++ b/src/runtime/fmisc.r       2005-12-07 21:35:58.000000000 -0800
@@ -195,7 +195,9 @@
                runerr(0);
             dst->table.size = src->table.size;
             dst->table.mask = src->table.mask;
-            dst->table.defvalue = src->table.defvalue;
+            memcpy((char *) &dst->table.defvalue,
+                  (char *) &src->table.defvalue,
+                  sizeof(dst->table.defvalue));
             for (i = 0; i < HSegs && src->table.hdir[i] != NULL; i++)
                memcpy((char *)dst->table.hdir[i], (char *)src->table.hdir[i],
                   src->table.hdir[i]->blksize);

Reply via email to