Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jan 2006 23:02:39 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Goran Gajic <ggajic@afrodita.rcub.bg.ac.yu>
Cc:        freebsd-current@www.freebsd.org, Steve Kargl <sgk@troutmask.apl.washington.edu>
Subject:   Re: recent changes to libc on amd64
Message-ID:  <20060117210239.GA60219@flame.pc>
In-Reply-To: <Pine.LNX.4.63.0601172145580.900@afrodita.rcub.bg.ac.yu>
References:  <Pine.LNX.4.63.0601151319150.30428@afrodita.rcub.bg.ac.yu> <84dead720601170605m406353b5nfbe9e4f2890b59b4@mail.gmail.com> <Pine.LNX.4.63.0601171543570.7222@afrodita.rcub.bg.ac.yu> <20060117153021.GA22577@troutmask.apl.washington.edu> <Pine.LNX.4.63.0601172145580.900@afrodita.rcub.bg.ac.yu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-01-17 21:52, Goran Gajic <ggajic@afrodita.rcub.bg.ac.yu> wrote:
> On Tue, 17 Jan 2006, Steve Kargl wrote:
>
> >
> >The problem with Xorg on amd64 is known, and I believe Jason
> >intends to look into the problem when his hardware arrives.
> >The prolem with joe appears to be new.  Can you build libncurses
> >and joe with debugging symbol to get more information?  Can
> >rebuild joe with electric fence?  Also, read the malloc manpage
> >for setting various flags.
> >
> >
>
> Hi,
>
> I have staticly linked joe with ncurses (both build with -g flag)  and got
> this:
>
> # gdb joe
> 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 "amd64-marcel-freebsd"...
> (gdb) run
> Starting program: /usr/ports/editors/joe/work/joe-3.3/joe
> Processing '/usr/local/etc/joe/joerc'...
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000440554 in tgoto (
>     string=0x20028f8 <Error reading address 0x20028f8: Bad address>, x=0,
> y=0)
>     at
> /usr/src/lib/libncurses/../../contrib/ncurses/ncurses/tinfo/lib_tgoto.c:4
> 6
> 46          if (string == 0 || *string == '\0') {
> (gdb) where
> #0  0x0000000000440554 in tgoto (
>     string=0x20028f8 <Error reading address 0x20028f8: Bad address>, x=0, y=0)
>     at /usr/src/lib/libncurses/../../contrib/ncurses/ncurses/tinfo/lib_tgoto.c:46

Address 0x20028f8 looks suspiciously similar to cap=0x802000200 from
stack frame #5 here.

> #1  0x000000000041c808 in texec (cap=0x802000200,
>     s=0x20028f8 <Error reading address 0x20028f8: Bad address>, l=0, a0=0,
>     a1=33564920, a2=0, a3=0) at termcap.c:518
> #2  0x000000000041cc54 in tcompile (cap=0x802000200,
>     s=0x20028f8 <Error reading address 0x20028f8: Bad address>, a0=0, a1=0,
>     a2=0, a3=0) at termcap.c:708
> #3  0x000000000040ba15 in kbuild (cap=0x802000200, kmap=0x802ff6de0,
>     seq=0x7fffffffe706 ".kN", bind=0x8020130e0, err=0x7fffffffe6a4,
>     capseq=0x0, seql=0) at kbd.c:246
> #4  0x000000000040bbb0 in kadd (cap=0x1, kmap=0x20028f8, seq=0x0, bind=0x0)
>     at kbd.c:297

Here, in frame #4, is the first instance of the address that is clipped
from 0x802000200 to something that can fit in an `int'.

> #5  0x0000000000412f3a in procrc (cap=0x802000200,
>     name=0x802002b58 "/usr/local/etc/joe/joerc") at rc.c:1164

It looks like the file that implements procrc() doesn't have a visible
prototype of kadd().

> #6  0x000000000040df06 in main (argc=1, argv=0x7fffffffec58, envv=0x802002b58)
>     at main.c:318
> (gdb)

This looks like a missing prototype somewhere in joe's source tree.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060117210239.GA60219>