qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] linux-user/i386: Properly align signal frame


From: Richard Henderson
Subject: Re: [PATCH] linux-user/i386: Properly align signal frame
Date: Fri, 26 May 2023 07:27:28 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 5/25/23 19:56, fanwj@mail.ustc.edu.cn wrote:

"The beginning of the structure, with pretaddr, should be just below 16-byte 
alignment."

It is incorrect! The beginning of the structure, with pretaddr not aligned as 
16-byte!
On x86-64, It aligned as (16n - sizeof(void*)) because of instruction "call" !

Exactly: 16n - sizeof(void*) is why I mean by "just below 16-byte alignment".
Which is exactly what I have done...

+    esp = esp - *frame_size + sizeof(abi_ulong);
+    esp = ROUND_DOWN(esp, 16) - sizeof(abi_ulong);

... here.


r~



reply via email to

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