Bug#322972: icon: ftbfs [sparc] Tests failed: ilib sorting table

2005-12-08 Thread Jurij Smakov

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: C99E03CCdiff -aur a/src/runtime/fmisc.r b/src/runtime/fmisc.r
--- a/src/runtime/fmisc.r   2002-07-10 09:49:39.0 -0700
+++ b/src/runtime/fmisc.r   2005-12-07 21:35:58.0 -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);


Bug#322972: icon: ftbfs [sparc] Tests failed: ilib sorting table

2005-08-13 Thread Blars Blarson
Package: icon
Version: 9.4.2-2.3
Severity: serious
Justification: no longer builds from source

icon failed to build on a sparc buildd, duplicated on my sparc pbuilder:


Testing ilib
Test-icon: line 43: 14767 Bus error   ./$EXE /dev/null $F.out 21
16,277c16
 dayoweekFriday 
 julian  2445951 
 saytime just gone  three o'clock 
 
 factors:
 divisors1 2 3 4 5 6 8 9 10 12 15 18 20 24 30 36 40 45 60 72 90 120 
180 360 
 divisorl1 2 3 4 6 8 9 12 16 18 24 32 36 48 64 72 96 144 192 288 576 
 factorial   1 
 factorial   720 
 factors 2 2 2 3 3 5 
 genfactors  2 2 2 3 3 5 
 gfactorial  15 
 ispower 3 
 isprime 97 
 nxtprime101 
 pfactors2 3 5 
 prdecomp3 2 1 
 prdecomp3 2 0 1 
 prime   2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 
83 89 97 
 sfactors2^3 3^2 5 
 squarefree  23 
 squarefree  
 squarefree  
 squarefree  26 
 squarefree  
 squarefree  
 squarefree  29 
 squarefree  30 
 [testing factorizations]
 [testing prime numbers]
 
 io:
 exists  
 directory   /tmp 
 
 lists:
 lcollate3 5 1 3 4 5 1 6 5 2 9 9 2 5 6 1 5 4 3 1 5 3 
 lcompact3 1 4 1 5 7 2 6 5 3 5 
 lclose  3 1 4 1 3 
 ldelete 3 1 1 5 9 2 6 5 3 5 
 ldupl   3 3 1 1 4 4 1 1 5 5 9 9 2 2 6 6 5 5 3 3 5 5 
 lequiv  3 1 4 1 5 9 2 6 5 3 5 
 lextend 3 1 4 1 5 9 2 6 5 3 5 3 1 4 1 5 9 2 6 5 
 lfliph  5 3 5 6 2 9 5 1 4 1 3 
 lflipv  7 9 6 9 5 1 8 4 5 7 5 
 limage  [ 3 , 1 , 4 , 1 , 5 , 9 , 2 , 6 , 5 , 3 , 5 ] 
 lindex  5 9 11 
 linterl 3 5 1 3 4 5 1 6 5 2 9 9 2 5 6 1 5 4 3 1 5 3 
 llayer  3 10 1 8 4 11 1 8 5 12 7 14 2 9 6 13 5 12 3 10 5 12 
 llpad   0 0 0 3 1 4 1 5 9 2 6 5 3 5 
 lltrim  1 4 1 5 9 2 6 5 3 5 
 lpalin  3 1 4 1 5 9 2 6 5 3 5 5 3 5 6 2 9 5 1 4 1 
 lpermute3 1 4 1 5 9 2 6 5 3 5 
 lreflect3 1 4 1 5 9 2 6 5 3 5 3 5 6 2 9 5 1 4 1 
 lremvals3 4 9 2 6 3 
 lrepl   3 1 4 1 5 9 2 6 5 3 5 3 1 4 1 5 9 2 6 5 3 5 
 lresidue0 1 1 1 2 0 2 0 2 0 2 
 lreverse5 3 5 6 2 9 5 1 4 1 3 
 lrotate 5 9 2 6 5 3 5 3 1 4 1 
 lrpad   3 1 4 1 5 9 2 6 5 3 5 0 0 0 
 lrtrim  3 1 4 1 5 9 2 6 
 lrundown3 3 2 3 2 1 3 2 1 3 1 1 4 3 4 3 2 4 3 2 1 4 4 3 2 
 lrunup  3 4 5 3 3 4 5 3 4 5 6 3 4 5 6 7 8 9 3 4 5 3 4 3 1 
 lshift  6 4 7 4 8 12 5 9 8 6 8 
 lswap   1 3 1 4 9 5 6 2 3 5 5 
 lunique 3 1 4 5 9 2 6 
 lmaxlen 9 
 lminlen 1 
 sortkeys3 4 5 2 5 5 
 sortvalues  1 1 9 6 3 
 str2lst Once  upon  a mid night  drea ry 
 
 math:
 binocoef4368 
 cosh1.600286858 
 sinh1.249367051 
 tanh0.7807144354 
 
 numbers:
 adp 3 
 adr 1 
 amean   10.6667 
 ceil4 
 commas  2,147,483,647 
 decimal 1. 
 decimal 0.5 
 decimal 0.[3] 
 decimal 0.25 
 decimal 0.2 
 decimal 0.1[6] 
 decimal 0.[142857] 
 decimal 0.125 
 decimal 0.[1] 
 decimal 0.1 
 decimal 0.[09] 
 decimal 0.08[3] 
 decimal 0.[076923] 
 decimal 0.0[714285] 
 decimal 0.0[6] 
 decimal 0.0625 
 decimal 0.[0588235294117647] 
 decimal 0.0[5] 
 decimal 0.[052631578947368421] 
 decimal 0.05 
 decipos 3.1415 
 digprod 903168 
 digred  1 
 digroot 1 
 digsum  46 10 1 
 distseq 13 24 10 21 7 18 4 15 1 12 23 9 20 6 17 3 14 25 11 22 8 19 5 
16 2 
 div 3.14159292 
 fix 3.1415 
 floor   1 
 frn 3.1416 
 gcd 6 
 gcdl3 
 gmean   5.194140423 
 hmean   2.721759118 
 large   214748364721474836472147483647 
 lcm 120 
 lcm 120 
 mantissa.7182818285 
 max 3.141592654 
 mdp 2 
 mdr 0 
 min 1.618033989 
 mod17 
 npalins 11 22 33 44 55 66 77 88 99 
 residue 7 
 roman   MCMLXXXIX 
 round   3 
 sign-1 
 spell   forty-seven thousand and seven thousand and one hundred and 
ninety-three 
 sum 96 
 trunc   1 
 unroman 1974 
 
 options:
 options a:1 b:1 c:1 i:1 r:1 s:1 v:1
 options a:1 b:1 c:1 i:1 r:1 s:1 v:1
 options a:bc i:42 r:98.6 s:-v
 options a:bc i:42 r:98.6 s:1 v:1
 options abc:- i:1 r:1 s:-v
 options a:bc i:42 r:1 s:1 v:1
argv - 98.6 -b x y 
 
 random:
 rand_num453816694 
 rand_int9 
 randomize
 randrange   41 
 randrangeseq59 65 71 77 83 89 95 54 60 66 72 78 84 90 96 55 61 67 73 79 
85 91 97 56 62 
 randseq 1903 204320185 193201979