Re: unaligned access using bash on glibc 2.5
"John David Anglin" <[email protected]>
| Newsgroups | gmane.linux.ports.hppa |
|---|---|
| Message-ID | <[email protected]> |
> On Wed, May 02, 2007 at 11:38:51AM +0200, Aurelien Jarno wrote:
> > Please find the reduced testcase below. When the value is assigned to
> > __libc_errno, the value of r19 has been overrided by the call to free().
> >
>
> And a smaller one:
>
>
> extern __thread int __libc_errno __attribute__ ((tls_model ("initial-exec")));
This is a bug in __attribute__ ((tls_model ("initial-exec"))). It
doesn't express that it uses r19. As a result, GCC is free to optimize
the save and restore of r19 across the call to free away.
The same is true of the asm.
Dave
--
J. David Anglin [email protected]
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)