Re: SIGSEGV in dc, at bcode.c:277 (function reset_bmachine())

From: Hizel Ildar <hizel_at_vyborg.ru>
Date: Tue, 13 Apr 2010 09:53:50 +0400
В Sat, 10 Apr 2010 17:14:54 -0700
David Wolfskill <david_at_catwhisker.org> пишет:

> As these things go, this probably isn't as critical as most thinsg
> disussed on this list, but I happened to notice it today, built a
> debugging world and at least cornered the annoying little varmint.
> 
> Sorry; no patch at this time. :-(
> 
> Here's how to reproduce it: while running CURRENT, invoke dc(1)
> using the command-line expression-soecification ("-e ..."), thus:
> 
> freebeast(9.0-C)[2] dc -e "6 2/p"
> Segmentation fault (core dumped)
> freebeast(9.0-C)[3] 
> 
> This was running:
> 
> FreeBSD freebeast.catwhisker.org 9.0-CURRENT FreeBSD 9.0-CURRENT #1
> r206447: Sat Apr 10 14:49:56 PDT 2010
> root_at_freebeast.catwhisker.org:/common/S1/obj/usr/src/sys/GENERIC  i386
> 

Also, when using the option -f file must be core dump :(

foo# echo '6 2/p' > /tmp/test
foo# dc -f /tmp/test
Segmentation fault (core dumped)
foo# gdb /usr/bin/dc dc.core 
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
Core was generated by `dc'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypto.so.6...done.
Loaded symbols for /lib/libcrypto.so.6
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x08049818 in reset_bmachine (src=0x804fc48) at /usr/src/usr.bin/dc/bcode.c:277
277             bmachine.readstack[0] = *src;
(gdb) bt
#0  0x08049818 in reset_bmachine (src=0x804fc48) at /usr/src/usr.bin/dc/bcode.c:277
#1  0x0804947e in procfile (fname=0xbfbfea22 "/tmp/test") at /usr/src/usr.bin/dc/dc.c:75
#2  0x0804951f in main (argc=3, argv=0xbfbfe8fc) at /usr/src/usr.bin/dc/dc.c:96
(gdb) quit
foo# uname -a
FreeBSD foo.vyborg.ru 9.0-CURRENT FreeBSD 9.0-CURRENT #1: Sun Apr 11 21:00:05 MSD 2010     root_at_foo.vyborg.ru:/usr/obj/usr/src/sys/GENERIC  i386
Received on Tue Apr 13 2010 - 03:53:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:02 UTC