[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Call for testing
From: |
Thomas Preud'homme |
Subject: |
Re: [Tinycc-devel] Call for testing |
Date: |
Fri, 25 Jan 2013 20:59:57 +0100 |
User-agent: |
KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) |
Le vendredi 25 janvier 2013 19:37:38, grischka a écrit :
> Thomas Preud'homme wrote:
> >> I just started but the
> >> good news is that it's limited to the -run function. There is no problem
> >> when compiling the example.
> >
> > Ok got it. Fix attached.
> >
> > diff --git a/tccelf.c b/tccelf.c
> > index da81d03..76a8002 100644
> > --- a/tccelf.c
> > +++ b/tccelf.c
> > @@ -1633,7 +1633,7 @@ static int elf_output_file(TCCState *s1, const char
> > *filename)
>
> Without knowing any details, I just notice that the proposed fix doesn't
> match the analysis of the problem: A change within elf_output_file()
> has no effect for tcc -run.
That's because the bug is not in tcc -run but manifest here. The bug is when
compiling a program with a call to ifunc function followed by dlsym with the
same function (ex strcpy() followed by (dlsym(RTLD_DEFAULT, "strcpy")).
Here the bug manifested in tcc -run because tcc was compiled with tcc. Since
the code doing the relocation in -run was using dlsym and the input program
contained a strcpy, it was trying to dlsym strcpy which was already executed
by tcc itself. Exactly the same pattern. So there is no bug in tcc -run
functions, only a bug in the linker. :)
>
> --- grischka
Thomas
signature.asc
Description: This is a digitally signed message part.
- Re: [Tinycc-devel] Call for testing, (continued)
Re: [Tinycc-devel] Call for testing, Thomas Preud'homme, 2013/01/24
Re: [Tinycc-devel] Call for testing, Didier Barvaux, 2013/01/24
Re: [Tinycc-devel] Call for testing, Thomas Preud'homme, 2013/01/25
Re: [Tinycc-devel] Call for testing, Thomas Preud'homme, 2013/01/25
Re: [Tinycc-devel] Call for testing, grischka, 2013/01/25
Re: [Tinycc-devel] Call for testing,
Thomas Preud'homme <=
Re: [Tinycc-devel] Call for testing, Didier Barvaux, 2013/01/26