* Re: the dynamic linker bug
[not found] <9712121305.AA19929@vlsi1.ultra.nyu.edu>
@ 1997-12-12 14:32 ` Ulrich Drepper
1997-12-12 15:46 ` H.J. Lu
0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Drepper @ 1997-12-12 14:32 UTC (permalink / raw)
To: Richard Kenner; +Cc: gcc2, egcs
kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
> I think this fixes it. Please confirm.
>
> Fri Dec 12 08:01:44 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
>
> * integrate.c (initialize_for_inline): In DECL_RTL of a PARM_DECL,
> look inside a (mem (addressof (mem ...))).
After bootstrapping the compiler and a full rebuilt of the libc it
still fails here. I'll examine this more closely now.
-- Uli
---------------. drepper at gnu.org ,-. Rubensstrasse 5
Ulrich Drepper \ ,-------------------' \ 76149 Karlsruhe/Germany
Cygnus Solutions `--' drepper at cygnus.com `------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: the dynamic linker bug
1997-12-12 14:32 ` the dynamic linker bug Ulrich Drepper
@ 1997-12-12 15:46 ` H.J. Lu
0 siblings, 0 replies; 5+ messages in thread
From: H.J. Lu @ 1997-12-12 15:46 UTC (permalink / raw)
To: drepper; +Cc: kenner, gcc2, egcs
>
> kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
>
> > I think this fixes it. Please confirm.
> >
> > Fri Dec 12 08:01:44 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
> >
> > * integrate.c (initialize_for_inline): In DECL_RTL of a PARM_DECL,
> > look inside a (mem (addressof (mem ...))).
>
> After bootstrapping the compiler and a full rebuilt of the libc it
> still fails here. I'll examine this more closely now.
>
It is __register_frame.
H.J.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: the dynamic linker bug
[not found] <19308.881955381@hurl.cygnus.com>
@ 1997-12-12 15:46 ` H.J. Lu
0 siblings, 0 replies; 5+ messages in thread
From: H.J. Lu @ 1997-12-12 15:46 UTC (permalink / raw)
To: law; +Cc: drepper, egcs
>
>
> In message <m0xgYTT-0004edC@ocean.lucon.org>you write:
> > Ulrich, you need my __register_frame patch to egcs 971207 and gcc
> > 2.8.0. You also need to put those new ones in libc.map. Please
> > check my previous emails.
> Actually, I tend to agree with Kenner that blah_new is a bad name,
> blah_v2 or something else might make more sense long term just in
> case the interface has to change again.
>
blah_v2 is ok with me. BTW, Kenner's patch also fixes egcs 971207.
I have built glibc 2.1 with egcs 971207 plus Kenner's patch and my
__register_frame patch.
--
H.J. Lu (hjl@gnu.org)
^ permalink raw reply [flat|nested] 5+ messages in thread
* the dynamic linker bug
@ 1997-12-12 3:55 Ulrich Drepper
1997-12-12 1:52 ` H.J. Lu
0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Drepper @ 1997-12-12 3:55 UTC (permalink / raw)
To: egcs, gcc2; +Cc: drepper
Hi,
I describe here what I found out. I cannot produce a small test case
but I can compare two assembler outputs and explain the context with
the sources. All this is on ix86. At then end of the mail is the
preprocessed source. You have to run
gcc /tmp/dl-reloc.i -Wall -c -O3 -g -momit-leaf-frame-pointer -mpentium -fPIC -fno-common -o dl-reloc.o
I tried to remove the -Wall but this changes the result!!!!!
The critical part of the code is compiled using the current CVS egcs
version (ok, the CVS version as of yesterday):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2d7: 89 45 b0 movl %eax,0xffffffb0(%ebp)
2da: 83 bd 50 ff ff cmpl $0x0,0xffffff50(%ebp)
2df: ff 00
2e1: 74 35 je 318 <_dl_relocate_object+0x318>
2e3: 8b 8d 50 ff ff movl 0xffffff50(%ebp),%ecx
2e8: ff
2e9: 83 79 04 00 cmpl $0x0,0x4(%ecx)
2ed: 74 29 je 318 <_dl_relocate_object+0x318>
2ef: 52 pushl %edx
2f0: 51 pushl %ecx
2f1: 8b 7d c8 movl 0xffffffc8(%ebp),%edi
2f4: 8b 57 fc movl 0xfffffffc(%edi),%edx
2f7: 8b 02 movl (%edx),%eax
2f9: 8b 40 04 movl 0x4(%eax),%eax
2fc: 50 pushl %eax
2fd: 8b 42 04 movl 0x4(%edx),%eax
300: 50 pushl %eax
301: 8d 45 e8 leal 0xffffffe8(%ebp),%eax
304: 50 pushl %eax
305: 8b 45 e8 movl 0xffffffe8(%ebp),%eax
308: 8b 00 movl (%eax),%eax
30a: 03 47 f8 addl 0xfffffff8(%edi),%eax
30d: 50 pushl %eax
30e: e8 fc ff ff ff call 30f <_dl_relocate_object+0x30f>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using an older version 2.90.15 I get:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2d7: 89 45 b0 movl %eax,0xffffffb0(%ebp)
2da: 83 bd 50 ff ff cmpl $0x0,0xffffff50(%ebp)
2df: ff 00
2e1: 74 35 je 318 <_dl_relocate_object+0x318>
2e3: 8b 8d 50 ff ff movl 0xffffff50(%ebp),%ecx
2e8: ff
2e9: 83 79 04 00 cmpl $0x0,0x4(%ecx)
2ed: 74 29 je 318 <_dl_relocate_object+0x318>
2ef: 52 pushl %edx
2f0: 51 pushl %ecx
2f1: 8b 7d c8 movl 0xffffffc8(%ebp),%edi
2f4: 8b 57 fc movl 0xfffffffc(%edi),%edx
2f7: 8b 02 movl (%edx),%eax
2f9: 8b 40 04 movl 0x4(%eax),%eax
2fc: 50 pushl %eax
2fd: 8b 42 04 movl 0x4(%edx),%eax
300: 50 pushl %eax
301: 8d 45 e8 leal 0xffffffe8(%ebp),%eax
304: 50 pushl %eax
305: 8b 4d b0 movl 0xffffffb0(%ebp),%ecx
308: 8b 01 movl (%ecx),%eax
30a: 03 47 f8 addl 0xfffffff8(%edi),%eax
30d: 50 pushl %eax
30e: e8 fc ff ff ff call 30f <_dl_relocate_object+0x30f>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The critical instruction is at address 305. You see the difference
wrong: 305: 8b 45 e8 movl 0xffffffe8(%ebp),%eax
correct: 305: 8b 4d b0 movl 0xffffffb0(%ebp),%ecx
The other key location is 2d7 where is both pieces of code 0xffffffb0(%ebp)
is initialized.
Looking at the source code you'll see this implements the following
(function elf_machine_rel, a bit reformatted):
const Elf32_Sym *const refsym = sym;
Elf32_Addr value = (( version ) != ((void *)0)
&& ( version )->hash != 0
? _dl_lookup_versioned_symbol (strtab + (* &sym )->st_name,
( &sym ), scope, l->l_name,
( version ), ( (( reloc->r_info ) & 0xff) ))
: _dl_lookup_symbol (strtab + (* &sym )->st_name, ( &sym ), scope,
l->l_name, ( (( reloc->r_info ) & 0xff) ))) ;
The call is too `_dl_lookup_versioned_symbol' ad the parameter we are
dealing with is the first which is computed as
strtab + (* &sym )->st_name
Please note that the second parameter is `&sym'.
Back to the assembler code: Obviously at address 30a the value of
`strtab' is added. The `st_name' element of `Elf32_Sym' is the first,
i.e., the
movl (%ecx),%eax
if the dereference of the pointer. But this means the %ecx (or %eax
in the wrong code, both solutions are equivalent here) has to be the
pointer `sym'. This value is loaded at address 305.
In the correct case it is loaded from 0xffffffb0(%ebp) which was
initialized at address 2d7.
But in the wrong case %eax is loaded from 0xffffffe8(%ebp). Please
note that this is the address which was pushed for the second
parameter before. The error is that at address 2d7 the value at
address 0xffffffb0(%ebp) is initialized, as for the correct version.
But this does not mean anything but that at address 305 uninitialized
memory is read.
So the problem is: why is at address 305 0xffffffe8(%ebp) read and not
0xffffffb0(%ebp)?
-- Uli
---------------. drepper at gnu.org ,-. Rubensstrasse 5
Ulrich Drepper \ ,-------------------' \ 76149 Karlsruhe/Germany
Cygnus Solutions `--' drepper at cygnus.com `------------------------
begin 644 dl-reloc.i.gz
M'XL("!K:D#0"`V1L+7)E;&]C+FD`[7UI=]M(DN!G\LV/R))?5XNV;$O4X8-E
M]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P?JG/-"?3B#2=QAGD\XLW<SJ[`7[6B6D,
M6N2)CAW'Y*X8"Y>(JUKX8/1JI$Q81^^![N.KV">F\D9WPRIBB`FV-ZSAKKKQ
M56%X**2*="=.=25T'/6H3CQ9.(R#:YRC8`)]8;-WT@CP[5OR$HHKYY.,Z6=F
M#&MT2A"JUDE!?N3O6RX^+S7_`DPH",[AJS1TE>:&U,UX+CW<G74EO!1\MN2Q
M&BXRE[CE"/4-=X?KA!MVQXIO*FL+A32B3,AO'6F#*#H,PM?+I%V,^B1UAX/I
M94=T-[B7\BUX+`/.ZD8X=3N@U,,@H\X`3TBZM['2+'0^F.+VL#<2]#IB6^:@
MPWB>T&ET5@S!N6;>-&B`V>O\UK&Y9CX%F-&IN4$G*^<^G)3D1H,9Z)R>*\-+
MM1\>="Q=C<KVFL83=IJ#SJU;/.SKH7(Z3J`M6G"H(^5%IUP=::TZ^INZ-M):
M;?3OH`R5(VH*I#(>TJ.ZN17C,5PM&73@GYR"S8>&OMA3J>O5>"-URW7JAV7J
M_S>6J9EG*N@(OYK`MFFH7RW4L"R_OZ$KU@W9UJW9ML@=ULEI_OM<&O\SSM#F
;19)5B^.417]2A'QI7%L5O^W^'X"XRVV.^P``
`
end
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: the dynamic linker bug
1997-12-12 3:55 Ulrich Drepper
@ 1997-12-12 1:52 ` H.J. Lu
0 siblings, 0 replies; 5+ messages in thread
From: H.J. Lu @ 1997-12-12 1:52 UTC (permalink / raw)
To: drepper; +Cc: egcs, gcc2
>
> Hi,
>
> I describe here what I found out. I cannot produce a small test case
> but I can compare two assembler outputs and explain the context with
> the sources. All this is on ix86. At then end of the mail is the
> preprocessed source. You have to run
>
> gcc /tmp/dl-reloc.i -Wall -c -O3 -g -momit-leaf-frame-pointer -mpentium -fPIC -fno-common -o dl-reloc.o
>
>
> I tried to remove the -Wall but this changes the result!!!!!
>
>
> The critical part of the code is compiled using the current CVS egcs
> version (ok, the CVS version as of yesterday):
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2d7: 89 45 b0 movl %eax,0xffffffb0(%ebp)
> 2da: 83 bd 50 ff ff cmpl $0x0,0xffffff50(%ebp)
> 2df: ff 00
> 2e1: 74 35 je 318 <_dl_relocate_object+0x318>
> 2e3: 8b 8d 50 ff ff movl 0xffffff50(%ebp),%ecx
> 2e8: ff
> 2e9: 83 79 04 00 cmpl $0x0,0x4(%ecx)
> 2ed: 74 29 je 318 <_dl_relocate_object+0x318>
> 2ef: 52 pushl %edx
> 2f0: 51 pushl %ecx
> 2f1: 8b 7d c8 movl 0xffffffc8(%ebp),%edi
> 2f4: 8b 57 fc movl 0xfffffffc(%edi),%edx
> 2f7: 8b 02 movl (%edx),%eax
> 2f9: 8b 40 04 movl 0x4(%eax),%eax
> 2fc: 50 pushl %eax
> 2fd: 8b 42 04 movl 0x4(%edx),%eax
> 300: 50 pushl %eax
> 301: 8d 45 e8 leal 0xffffffe8(%ebp),%eax
> 304: 50 pushl %eax
> 305: 8b 45 e8 movl 0xffffffe8(%ebp),%eax
> 308: 8b 00 movl (%eax),%eax
> 30a: 03 47 f8 addl 0xfffffff8(%edi),%eax
> 30d: 50 pushl %eax
> 30e: e8 fc ff ff ff call 30f <_dl_relocate_object+0x30f>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Using an older version 2.90.15 I get:
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2d7: 89 45 b0 movl %eax,0xffffffb0(%ebp)
> 2da: 83 bd 50 ff ff cmpl $0x0,0xffffff50(%ebp)
> 2df: ff 00
> 2e1: 74 35 je 318 <_dl_relocate_object+0x318>
> 2e3: 8b 8d 50 ff ff movl 0xffffff50(%ebp),%ecx
> 2e8: ff
> 2e9: 83 79 04 00 cmpl $0x0,0x4(%ecx)
> 2ed: 74 29 je 318 <_dl_relocate_object+0x318>
> 2ef: 52 pushl %edx
> 2f0: 51 pushl %ecx
> 2f1: 8b 7d c8 movl 0xffffffc8(%ebp),%edi
> 2f4: 8b 57 fc movl 0xfffffffc(%edi),%edx
> 2f7: 8b 02 movl (%edx),%eax
> 2f9: 8b 40 04 movl 0x4(%eax),%eax
> 2fc: 50 pushl %eax
> 2fd: 8b 42 04 movl 0x4(%edx),%eax
> 300: 50 pushl %eax
> 301: 8d 45 e8 leal 0xffffffe8(%ebp),%eax
> 304: 50 pushl %eax
> 305: 8b 4d b0 movl 0xffffffb0(%ebp),%ecx
> 308: 8b 01 movl (%ecx),%eax
> 30a: 03 47 f8 addl 0xfffffff8(%edi),%eax
> 30d: 50 pushl %eax
> 30e: e8 fc ff ff ff call 30f <_dl_relocate_object+0x30f>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> The critical instruction is at address 305. You see the difference
>
> wrong: 305: 8b 45 e8 movl 0xffffffe8(%ebp),%eax
>
> correct: 305: 8b 4d b0 movl 0xffffffb0(%ebp),%ecx
>
>
> The other key location is 2d7 where is both pieces of code 0xffffffb0(%ebp)
> is initialized.
>
>
> Looking at the source code you'll see this implements the following
> (function elf_machine_rel, a bit reformatted):
>
>
> const Elf32_Sym *const refsym = sym;
> Elf32_Addr value = (( version ) != ((void *)0)
> && ( version )->hash != 0
> ? _dl_lookup_versioned_symbol (strtab + (* &sym )->st_name,
> ( &sym ), scope, l->l_name,
> ( version ), ( (( reloc->r_info ) & 0xff) ))
> : _dl_lookup_symbol (strtab + (* &sym )->st_name, ( &sym ), scope,
> l->l_name, ( (( reloc->r_info ) & 0xff) ))) ;
>
>
> The call is too `_dl_lookup_versioned_symbol' ad the parameter we are
> dealing with is the first which is computed as
>
> strtab + (* &sym )->st_name
>
> Please note that the second parameter is `&sym'.
>
> Back to the assembler code: Obviously at address 30a the value of
> `strtab' is added. The `st_name' element of `Elf32_Sym' is the first,
> i.e., the
>
> movl (%ecx),%eax
>
> if the dereference of the pointer. But this means the %ecx (or %eax
> in the wrong code, both solutions are equivalent here) has to be the
> pointer `sym'. This value is loaded at address 305.
>
> In the correct case it is loaded from 0xffffffb0(%ebp) which was
> initialized at address 2d7.
>
>
> But in the wrong case %eax is loaded from 0xffffffe8(%ebp). Please
> note that this is the address which was pushed for the second
> parameter before. The error is that at address 2d7 the value at
> address 0xffffffb0(%ebp) is initialized, as for the correct version.
> But this does not mean anything but that at address 305 uninitialized
> memory is read.
>
>
> So the problem is: why is at address 305 0xffffffe8(%ebp) read and not
> 0xffffffb0(%ebp)?
>
That is one of 2 bugs. 16(%ebp), which is the third argument of
_dl_relocate_object (), is mixed up with -24(%ebp).
H.J.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1997-12-12 15:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <9712121305.AA19929@vlsi1.ultra.nyu.edu>
1997-12-12 14:32 ` the dynamic linker bug Ulrich Drepper
1997-12-12 15:46 ` H.J. Lu
[not found] <19308.881955381@hurl.cygnus.com>
1997-12-12 15:46 ` H.J. Lu
1997-12-12 3:55 Ulrich Drepper
1997-12-12 1:52 ` H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).