Bug 28223 - mips: clone does not align stack
Summary: mips: clone does not align stack
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.35
: P2 normal
Target Milestone: 2.35
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-12 16:37 UTC by Xi Ruoyao
Modified: 2021-12-14 22:18 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xi Ruoyao 2021-08-12 16:37:26 UTC
On MIPS, with O32 ABI clone should align stack to 4 bytes, and with N32/N64 ABI clone should align stack to 8 bytes.

This causes:

FAIL: misc/tst-misalign-clone
Comment 1 Sourceware Commits 2021-08-12 20:32:24 UTC
The master branch has been updated by Joseph Myers <jsm28@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1f51cd9a860ee45eee8a56fb2ba925267a2a7bfe

commit 1f51cd9a860ee45eee8a56fb2ba925267a2a7bfe
Author: Xi Ruoyao <xry111@mengyan1223.wang>
Date:   Thu Aug 12 20:31:59 2021 +0000

    mips: align stack in clone [BZ #28223]
    
    The MIPS O32 ABI requires 4 byte aligned stack, and the MIPS N64 and N32
    ABI require 8 byte aligned stack.  Previously if the caller passed an
    unaligned stack to clone the the child misbehaved.
    
    Fixes bug 28223.
Comment 2 Joseph Myers 2021-08-12 20:34:58 UTC
Fixed for 2.35.
Comment 3 Sourceware Commits 2021-12-14 22:18:40 UTC
The release/2.34/master branch has been updated by Aurelien Jarno <aurel32@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7af07fe795f43e53d31be1c6f9adba7e05f87b0b

commit 7af07fe795f43e53d31be1c6f9adba7e05f87b0b
Author: Xi Ruoyao <xry111@mengyan1223.wang>
Date:   Thu Aug 12 20:31:59 2021 +0000

    mips: align stack in clone [BZ #28223]
    
    The MIPS O32 ABI requires 4 byte aligned stack, and the MIPS N64 and N32
    ABI require 8 byte aligned stack.  Previously if the caller passed an
    unaligned stack to clone the the child misbehaved.
    
    Fixes bug 28223.
    
    (cherry picked from commit 1f51cd9a860ee45eee8a56fb2ba925267a2a7bfe)