NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/58949: t_time_arith:itimer_transitions test program crashes on big endian 32bit arm



>Number:         58949
>Category:       toolchain
>Synopsis:       t_time_arith:itimer_transitions test program crashes on big endian 32bit arm
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 30 17:20:00 +0000 2024
>Originator:     Martin Husemann
>Release:        NetBSD 10.99.12
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD space-truckin.duskware.de 10.99.12 NetBSD 10.99.12 (GENERIC) #385: Mon Dec 30 12:45:21 CET 2024 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/evbarm/compile/GENERIC evbarm
Architecture: earmv7hfeb
Machine: evbarm
>Description:

cd /usr/tests/kernel &&  atf-run t_time_arith | atf-report    Tests root: /usr/tests/kernel

t_time_arith (1/1): 1 test cases
    itimer_transitions: [1.436877s] Failed: Test program received signal 4 (core dumped)
[1.439234s]

Failed test cases:
    t_time_arith:itimer_transitions


gdb ./t_time_arith 
[..]
(gdb) run itimer_transitions
Starting program: /usr/tests/kernel/t_time_arith itimer_transitions
[..]
case 30

Program received signal SIGILL, Illegal instruction.
__udivmoddi4 (a=18446744073709551614, b=0, rem=0x7ffc6ec8)
    at /work/src/sys/external/bsd/compiler_rt/dist/lib/builtins/udivmoddi4.c:66
warning: 66     /work/src/sys/external/bsd/compiler_rt/dist/lib/builtins/udivmoddi4.c: No such file or directory
(gdb) bt
#0  __udivmoddi4 (a=18446744073709551614, b=0, rem=0x7ffc6ec8)
    at /work/src/sys/external/bsd/compiler_rt/dist/lib/builtins/udivmoddi4.c:66
#1  0x7a1a633c in __aeabi_uldivmod () from /usr/lib/libc.so.12
#2  0x0000bba8 in itimer_transition (it=it@entry=0x7ffc6f80, 
    now=now@entry=0x7ffc6fa0, next=0x7ffc6f78, next@entry=0x7ffc6f70, 
    overrunsp=0xbba8 <itimer_transition+356>, overrunsp@entry=0x7ffc6f6c)
    at /work/src/sys/kern/subr_time_arith.c:480
#3  0x0000b2d4 in atfu_itimer_transitions_body (tc=<optimized out>)
    at /work/src/tests/kernel/t_time_arith.c:360
#4  0x7a21e69c in atf_tc_run (tc=0xe500 <atfu_itimer_transitions_tc>, 
    resfile=<optimized out>) at /work/src/external/bsd/atf/dist/atf-c/tc.c:1024
#5  0x7a21af78 in run_tc (exitcode=<synthetic pointer>, p=0x7ffc7048, 
    tp=0x7ffc7044)
    at /work/src/external/bsd/atf/dist/atf-c/detail/tp_main.c:510
#6  controlled_main (exitcode=<synthetic pointer>, add_tcs_hook=0x1, 
    argv=<optimized out>, argc=<optimized out>)
    at /work/src/external/bsd/atf/dist/atf-c/detail/tp_main.c:580
#7  atf_tp_main (argc=<optimized out>, argv=<optimized out>, add_tcs_hook=0x1)
    at /work/src/external/bsd/atf/dist/atf-c/detail/tp_main.c:610
#8  0x0000bd6c in main (argc=<optimized out>, argv=<optimized out>)
    at /work/src/tests/kernel/t_time_arith.c:406
#9  0x0000aee0 in ___start (cleanup=<optimized out>, ps_strings=0x7ffc7ff0)
    at /work/src/lib/csu/common/crt0-common.c:349
(gdb) p rem
$1 = (du_int *) 0x7ffc6ec8
(gdb) p *rem
$2 = 9222369730975882796
(gdb) p n
$3 = <optimized out>
(gdb) p n.s.low
$4 = <optimized out>
(gdb) p d.s.low
$5 = <optimized out>
(gdb) x/16i $pc-32
   0x7a1a659c <__udivmoddi4+408>:       beq     0x7a1a662c <__udivmoddi4+552>
   0x7a1a65a0 <__udivmoddi4+412>:       rbit    r0, r5
   0x7a1a65a4 <__udivmoddi4+416>:       clz     r0, r0
   0x7a1a65a8 <__udivmoddi4+420>:       rsb     r2, r0, #32
   0x7a1a65ac <__udivmoddi4+424>:       lsr     r3, r1, r0
   0x7a1a65b0 <__udivmoddi4+428>:       orr     r1, r3, r4, lsl r2
   0x7a1a65b4 <__udivmoddi4+432>:       lsr     r0, r4, r0
   0x7a1a65b8 <__udivmoddi4+436>:       
    pop {r4, r5, r6, r7, r8, r9, r10, pc}
=> 0x7a1a65bc <__udivmoddi4+440>:       udf     #0
   0x7a1a65c0 <__udivmoddi4+444>:       clz     r2, r0
   0x7a1a65c4 <__udivmoddi4+448>:       clz     r3, r5
   0x7a1a65c8 <__udivmoddi4+452>:       sub     r3, r3, r2
   0x7a1a65cc <__udivmoddi4+456>:       cmn     r3, #1
   0x7a1a65d0 <__udivmoddi4+460>:       add     r2, r3, #33     @ 0x21
   0x7a1a65d4 <__udivmoddi4+464>:       moveq   r8, r6
   0x7a1a65d8 <__udivmoddi4+468>:       beq     0x7a1a650c <__udivmoddi4+264>
(gdb) info reg
r0             0xffffffff          4294967295
r1             0xfffffffe          4294967294
r2             0x0                 0
r3             0x0                 0
r4             0xffffffff          4294967295
r5             0x0                 0
r6             0x0                 0
r7             0x7ffc6ec8          2147249864
r8             0x0                 0
r9             0xfffffffe          4294967294
r10            0xffffffff          4294967295
r11            0x0                 0
r12            0xffffffff          4294967295
sp             0x7ffc6ea0          0x7ffc6ea0
lr             0x7a1a633c          2048549692
pc             0x7a1a65bc          0x7a1a65bc <__udivmoddi4+440>
cpsr           0x600d0210          1611465232
fpscr          0x0                 0


>How-To-Repeat:
s/a

>Fix:
n/a



Home | Main Index | Thread Index | Old Index