Package: swi-prolog-nox
Version: 5.10.4-1
Severity: serious
Justification: fails to build from source

The current version of swi-prolog fails to build on mipsel with bus
error. I tried to investigate using qemu. The error happens in function
put_double(). gdb shows that current instruction is

   sdc1 $f20,4(v1)

According to MIPS instruction set manual it is "store doubleword from
coprocessor". The destination address (here, 4+v1) should be "naturally
aligned" (I guess in this case alignment should be 8). But register dump
shows that v1 contains 0x00428df8 that combined with displacement 4
gives wrong alignment.

This is all that I found for now. GDB log with additional information is
attached.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.39-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=uk_UA.UTF-8, LC_CTYPE=uk_UA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages swi-prolog-nox depends on:
ii  libc6                     2.13-10        Embedded GNU C Library: Shared lib
ii  libgmp10                  2:5.0.1+dfsg-7 Multiprecision arithmetic library
ii  libgmp3-dev               2:5.0.1+dfsg-7 Multiprecision arithmetic library 
ii  libncurses5               5.9-1          shared libraries for terminal hand
ii  libreadline-dev           6.2-2          GNU readline and history libraries
ii  libreadline6              6.2-2          GNU readline and history libraries

swi-prolog-nox recommends no packages.

Versions of packages swi-prolog-nox suggests:
pn  prolog-el                     <none>     (no description available)
pn  swi-prolog-doc                <none>     (no description available)

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/lib/swi-prolog/library/INDEX.pl (from swi-prolog-nox 
package)
#0  0x2aaed2b0 in put_double () from ../lib/mipsel/libswipl.so.5.10.4
#1  0x2ab83798 in put_number () from ../lib/mipsel/libswipl.so.5.10.4
#2  0x2ab83e50 in PL_unify_number () from ../lib/mipsel/libswipl.so.5.10.4
#3  0x2ab3cc38 in pl_statistics_ld () from ../lib/mipsel/libswipl.so.5.10.4
#4  0x2ab3d4f0 in pl_statistics2_va () from ../lib/mipsel/libswipl.so.5.10.4
#5  0x2ab00194 in PL_next_solution () from ../lib/mipsel/libswipl.so.5.10.4
#6  0x2ab3d918 in callProlog () from ../lib/mipsel/libswipl.so.5.10.4
#7  0x2ab78740 in pl_with_mutex () from ../lib/mipsel/libswipl.so.5.10.4
#8  0x2ab000cc in PL_next_solution () from ../lib/mipsel/libswipl.so.5.10.4
#9  0x2ab3d918 in callProlog () from ../lib/mipsel/libswipl.so.5.10.4
#10 0x2ab78740 in pl_with_mutex () from ../lib/mipsel/libswipl.so.5.10.4
#11 0x2ab000cc in PL_next_solution () from ../lib/mipsel/libswipl.so.5.10.4
#12 0x2ab3d918 in callProlog () from ../lib/mipsel/libswipl.so.5.10.4
#13 0x2ab66a54 in compileFile () from ../lib/mipsel/libswipl.so.5.10.4
#14 0x2ab69d2c in compileFileList () from ../lib/mipsel/libswipl.so.5.10.4
#15 0x2ab8184c in PL_initialise () from ../lib/mipsel/libswipl.so.5.10.4
#16 0x0040083c in main ()
Undefined command: "disasm".  Try "help".
Dump of assembler code for function put_double:
   0x2aaed218 <+0>:     lui     gp,0x10
   0x2aaed21c <+4>:     addiu   gp,gp,1624
   0x2aaed220 <+8>:     addu    gp,gp,t9
   0x2aaed224 <+12>:    addiu   sp,sp,-48
   0x2aaed228 <+16>:    sw      s1,32(sp)
   0x2aaed22c <+20>:    sdc1    $f20,40(sp)
   0x2aaed230 <+24>:    lw      s1,68(sp)
   0x2aaed234 <+28>:    mtc1    a2,$f20
   0x2aaed238 <+32>:    lw      a1,64(sp)
   0x2aaed23c <+36>:    sw      s0,28(sp)
   0x2aaed240 <+40>:    sw      gp,16(sp)
   0x2aaed244 <+44>:    sw      ra,36(sp)
   0x2aaed248 <+48>:    li      v0,4
   0x2aaed24c <+52>:    move    s0,a0
   0x2aaed250 <+56>:    mtc1    a3,$f21
   0x2aaed254 <+60>:    beq     a1,v0,0x2aaed288 <put_double+112>
   0x2aaed258 <+64>:    lw      v1,88(s1)
   0x2aaed25c <+68>:    lw      a0,92(s1)
   0x2aaed260 <+72>:    addiu   v0,v1,44
   0x2aaed264 <+76>:    sltu    v0,a0,v0
   0x2aaed268 <+80>:    bnez    v0,0x2aaed2d0 <put_double+184>
   0x2aaed26c <+84>:    lw      t9,-32680(gp)
   0x2aaed270 <+88>:    lw      v0,144(s1)
   0x2aaed274 <+92>:    lw      a0,148(s1)
   0x2aaed278 <+96>:    addiu   v0,v0,24
   0x2aaed27c <+100>:   sltu    v0,a0,v0
   0x2aaed280 <+104>:   bnez    v0,0x2aaed2d0 <put_double+184>
   0x2aaed284 <+108>:   move    at,at
   0x2aaed288 <+112>:   lw      a1,284(s1)
   0x2aaed28c <+116>:   li      a0,1042
   0x2aaed290 <+120>:   subu    a1,v1,a1
   0x2aaed294 <+124>:   sll     a1,a1,0x5
   0x2aaed298 <+128>:   addiu   v0,v1,16
   0x2aaed29c <+132>:   ori     a1,a1,0xa
   0x2aaed2a0 <+136>:   sw      v0,88(s1)
   0x2aaed2a4 <+140>:   sw      a1,0(s0)
   0x2aaed2a8 <+144>:   li      v0,1
   0x2aaed2ac <+148>:   sw      a0,0(v1)
=> 0x2aaed2b0 <+152>:   sdc1    $f20,4(v1)
   0x2aaed2b4 <+156>:   sw      a0,12(v1)
   0x2aaed2b8 <+160>:   lw      ra,36(sp)
   0x2aaed2bc <+164>:   lw      s1,32(sp)
   0x2aaed2c0 <+168>:   lw      s0,28(sp)
   0x2aaed2c4 <+172>:   ldc1    $f20,40(sp)
   0x2aaed2c8 <+176>:   jr      ra
   0x2aaed2cc <+180>:   addiu   sp,sp,48
   0x2aaed2d0 <+184>:   jalr    t9
   0x2aaed2d4 <+188>:   li      a0,4
   0x2aaed2d8 <+192>:   li      v1,1
   0x2aaed2dc <+196>:   bne     v0,v1,0x2aaed2bc <put_double+164>
   0x2aaed2e0 <+200>:   lw      ra,36(sp)
   0x2aaed2e4 <+204>:   b       0x2aaed288 <put_double+112>
   0x2aaed2e8 <+208>:   lw      v1,88(s1)
End of assembler dump.
Undefined show command: "all-registers".  Try "help show".
          zero       at       v0       v1       a0       a1       a2       a3
 R0   00000000 3000a401 00000001 00428df8 00000412 0001538a 66666666 3fe66666 
            t0       t1       t2       t3       t4       t5       t6       t7
 R8   00000000 00000000 00000000 00000000 00000001 004c4b40 6671c96e 00000000 
            s0       s1       s2       s3       s4       s5       s6       s7
 R16  7fafe794 2abe8e38 00000001 7fafe794 00000000 2aafc000 2aaec000 2aaec000 
            t8       t9       k0       k1       gp       sp       s8       ra
 R24  00000000 2ab2a068 2abe8e38 00000000 2abed870 7fafe708 2aafc000 2ab83798 
        status       lo       hi badvaddr    cause       pc
      0000a413 7e88ea52 000005cf 00428dfc 10800014 2aaed2b0 
 f0:  0x66666666 flt: 2.72008302e+23    dbl: 0.69999999999999996     
 f1:  0x3fe66666 flt: 1.79999995       
 f2:  0x00000046 flt: 9.80908925e-44    dbl: 0.59999990463257613     
 f3:  0x3fe33333 flt: 1.77499998       
 f4:  0x4e23ebae flt: 687532928         dbl: -nan                    
 f5:  0xffffffff flt: -nan             
 f6:  0xffffffff flt: -nan              dbl: -nan                    
 f7:  0xffffffff flt: -nan             
 f8:  0xffffffff flt: -nan              dbl: -nan                    
 f9:  0xffffffff flt: -nan             
 f10: 0xffffffff flt: -nan              dbl: -nan                    
 f11: 0xffffffff flt: -nan             
 f12: 0x66666666 flt: 2.72008302e+23    dbl: 0.69999999999999996     
 f13: 0x3fe66666 flt: 1.79999995       
 f14: 0xffffffff flt: -nan              dbl: -nan                    
 f15: 0xffffffff flt: -nan             
 f16: 0xffffffff flt: -nan              dbl: -nan                    
 f17: 0xffffffff flt: -nan             
 f18: 0xffffffff flt: -nan              dbl: -nan                    
 f19: 0xffffffff flt: -nan             
 f20: 0x66666666 flt: 2.72008302e+23    dbl: 0.69999999999999996     
 f21: 0x3fe66666 flt: 1.79999995       
 f22: 0xffffffff flt: -nan              dbl: -nan                    
 f23: 0xffffffff flt: -nan             
 f24: 0xffffffff flt: -nan              dbl: -nan                    
 f25: 0xffffffff flt: -nan             
 f26: 0xffffffff flt: -nan              dbl: -nan                    
 f27: 0xffffffff flt: -nan             
 f28: 0xffffffff flt: -nan              dbl: -nan                    
 f29: 0xffffffff flt: -nan             
 f30: 0xffffffff flt: -nan              dbl: -nan                    
 f31: 0xffffffff flt: -nan             
          fcsr      fir  restart
      00001004 00000000 00000000 
quit
A debugging session is active.

        Inferior 1 [process 2113] will be killed.

Quit anyway? (y or n) 

Reply via email to