NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
toolchain/59461: m68k gcc miscompiles pkgsrc x11/rxvt
>Number: 59461
>Category: toolchain
>Synopsis: m68k gcc miscompiles pkgsrc x11/rxvt
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jun 09 17:25:00 +0000 2025
>Originator: MartinHusemann
>Release: NetBSD 10.99.14
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD amiga.aprisoft.de 10.99.14 NetBSD 10.99.14 (GENERIC) #6: Sun Jun 8 08:11:46 CEST 2025 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/amiga/compile/GENERIC amiga
Architecture: m68k
Machine: amiga
>Description:
Trying to run x11/rxvt from pkgsrc fails immediately with a stack check
failure:
Reading symbols from /usr/pkg/bin/rxvt...
[New process 28472]
Core was generated by `rxvt'.
Program terminated with signal SIGABRT, Aborted.
#0 0x0e2da778 in _lwp_kill () from /usr/lib/libc.so.12
(gdb) bt
#0 0x0e2da778 in _lwp_kill () from /usr/lib/libc.so.12
#1 0x0e2da726 in raise (s=6) at /work/src/lib/libc/gen/raise.c:48
#2 0x0e2bd550 in __fail (msg=0xe2efcff "stack overflow detected; terminated")
at /work/src/lib/libc/misc/stack_protector.c:104
#3 0x0e2bd572 in __stack_chk_fail ()
at /work/src/lib/libc/misc/stack_protector.c:111
#4 0x0000d806 in rxvt_tt_winsize ()
#5 0x00015f24 in rxvt_scr_reset ()
#6 0x0000f474 in rxvt_init ()
#7 0x0001d076 in main ()
(gdb) up 4
#4 0x0000d806 in rxvt_tt_winsize ()
(gdb) disas
Dump of assembler code for function rxvt_tt_winsize:
0x0000d794 <+0>: linkw %fp,#-12
0x0000d798 <+4>: movel %a5,%sp@-
0x0000d79a <+6>: movel %a2,%sp@-
0x0000d79c <+8>: lea %pc@(0x27690),%a5
0x0000d7a4 <+16>: movel %fp@(8),%d0
0x0000d7a8 <+20>: moveal %fp@(12),%a0
0x0000d7ac <+24>: movel %fp@(16),%d1
0x0000d7b0 <+28>: moveaw %fp@(-4),%a1
0x0000d7b4 <+32>: moveaw %fp@(-2),%a1
0x0000d7b8 <+36>: moveal %a5@(468),%a2
0x0000d7c0 <+44>: moveal %a2@,%a1
0x0000d7c2 <+46>: tstl %d0
0x0000d7c4 <+48>: blts 0xd7ec <rxvt_tt_winsize+88>
0x0000d7c6 <+50>: movew %a0,%fp@(-10)
0x0000d7ca <+54>: movew %d1,%fp@(-12)
0x0000d7ce <+58>: clrw %fp@(-6)
0x0000d7d2 <+62>: clrw %fp@(-8)
0x0000d7d6 <+66>: pea %fp@(-12)
0x0000d7da <+70>: movel #-2146929561,%sp@-
0x0000d7e0 <+76>: movel %d0,%sp@-
0x0000d7e2 <+78>: bsrl 0x87a8 <ioctl@plt>
0x0000d7e8 <+84>: lea %sp@(12),%sp
0x0000d7ec <+88>: movew %fp@(-4),%d0
0x0000d7f0 <+92>: swap %d0
0x0000d7f2 <+94>: clrw %d0
0x0000d7f4 <+96>: movew %fp@(-2),%d1
0x0000d7f8 <+100>: orw %d1,%d0
0x0000d7fa <+102>: movel %a2@,%d1
0x0000d7fc <+104>: cmpl %d1,%d0
0x0000d7fe <+106>: beqs 0xd806 <rxvt_tt_winsize+114>
0x0000d800 <+108>: bsrl 0x7f88 <__stack_chk_fail@plt>
=> 0x0000d806 <+114>: moveal %fp@(-20),%a2
0x0000d80a <+118>: moveal %fp@(-16),%a5
0x0000d80e <+122>: unlk %fp
0x0000d810 <+124>: rts
rxvt_tt_winsize is a quite simple function with the speciallity of
receiving 16byte arguments.
void
rxvt_tt_winsize(int fd, unsigned short col, unsigned short row)
{
struct winsize ws;
if (fd < 0)
return;
ws.ws_col = col;
ws.ws_row = row;
ws.ws_xpixel = ws.ws_ypixel = 0;
ioctl(fd, TIOCSWINSZ, &ws);
}
>How-To-Repeat:
run rxvt on m68k -current.
>Fix:
n/a
Home |
Main Index |
Thread Index |
Old Index