guile-user
[Top][All Lists]
Advanced

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

readline works fine on alpha after all (when present!)


From: Greg Troxel
Subject: readline works fine on alpha after all (when present!)
Date: 11 Oct 2002 19:46:14 -0400

I earlier reported that guile was losing due to an unaligned access on
NetBSD/alpha when trying to dynlink libguilereadline.  It turns out
that once I installed readline, things work fine.  So, sorry for the
false alarm.

Both 1.6.0 and 1.4.1.91 happily compiled and installed versions of
libguilereadline that get an unaligned access exception.  Both were
run with ./configure having only --prefix.  I rebuilt 1.6.0 after
installing readline, and it worked, but 1.4.1.91 was still not ok -
presumably I'd have to rebuild that too, as libreadline was not listed
in dependency_libs in libguilereadline.la.  In the 1.6.0 version
_after_ rebuilding from scratch, libguilereadline-v-12.la had
/usr/pkg/lib/libreadline.la (and I'm sure 1.4.1.91 would too if I
rebuilt that).

So, it seems that the code in the case of no readline present does
something odd, or dlopen does something odd.  The assembly is pretty
simple:

0x0 <scm_init_guilereadline>:   subq    sp,0x10,sp
(gdb) 
0x4 <scm_init_guilereadline+4>: stq     ra,0(sp)
(gdb) 
0x8 <scm_init_guilereadline+8>: stq     fp,8(sp)
(gdb) 
0xc <scm_init_guilereadline+12>:        mov     sp,fp
(gdb) 
0x10 <scm_init_guilereadline+16>:       mov     fp,sp
(gdb) 
0x14 <scm_init_guilereadline+20>:       ldq     ra,0(sp)
(gdb) 
0x18 <scm_init_guilereadline+24>:       ldq     fp,8(sp)
(gdb) 
0x1c <scm_init_guilereadline+28>:       addq    sp,0x10,sp
(gdb) 
0x20 <scm_init_guilereadline+32>:       ret     zero,(ra),0x1
(gdb) 
0x24 <scm_init_guilereadline+36>:       halt

and I think this is just saving/restoring the stack and returning
zero, but I'm fuzzy on alpha assembly.

Given that readline works when it is actually present, I'm
inclined to stop worrying about this.

        Greg Troxel <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]