Re: unaligned access using bash on glibc 2.5

Aurelien Jarno <[email protected]>
Newsgroups gmane.linux.ports.hppa
Message-ID <[email protected]>
John David Anglin a écrit :
>> 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.

What would be the correct way to express that?

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.