Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcxx/memory/trivial_abi/{unique,weak}_ptr_ret.pass.cpp tests fail on 32-bit x86 #48283

Closed
llvmbot opened this issue Jan 29, 2021 · 8 comments
Closed
Labels
bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Member

llvmbot commented Jan 29, 2021

Bugzilla Link 48939
Resolution FIXED
Resolved on Jun 04, 2021 20:36
Version trunk
OS Linux
Blocks #48661
Attachments Output of tests (.txt), sys-libs:libcxx-12.0.0_rc1:20210129-094954.log.xz
Reporter LLVM Bugzilla Contributor
CC @mkurdej,@hvdijk,@ldionne,@slacka,@tstellar
Fixed by commit(s) 73cdc75 f1b1151

Extended Description

I get the following two failures on 32-bit x86 (using amd64 multilib):

libc++ :: libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp
libc++ :: libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp

I'm attaching the full output of the tests. The errors seem to boil down to:

t.tmp.exe: /tmp/portage/sys-libs/libcxx-12.0.0_rc1/work/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp:49: int main(int, char *): Assertion `(void)&ret != local_addr' failed.

t.tmp.exe: /tmp/portage/sys-libs/libcxx-12.0.0_rc1/work/libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp:55: int main(int, char *): Assertion `(void)&ret != local_addr' failed.

These tests pass on pure amd64.

@mkurdej
Copy link
Member

mkurdej commented Feb 3, 2021

These tests were added after release 11 (revision https://reviews.llvm.org/D82490, commit 76887bc) and, to the best of my knowledge, never passed on 32-bit x86.
Also, they're disabled on ARM32 (since commit f5e49bd):

#ifndef __arm__
  // On ARM32, structs larger than 4 bytes cannot be returned in registers.
  // Thus, weak_ptr will be passed indrectly even if it is trivial.
  assert((void*)&ret != local_addr);
#endif

IMO, this comment applies to 32-bit x86 as well.

Anyway, I don't think it should be a release blocker.

@tstellar
Copy link
Collaborator

This bug was not resolved in time for the 12.0.0 release, so it will have to wait for 12.0.1.

If you feel this is a high-priority bug that should be fixed for 12.0.0, please re-add release-12.0.0 to the Blocks field and add a comment explaining why this is high-priority.

@slacka
Copy link
Mannequin

slacka mannequin commented Feb 26, 2021

I doubled checked and all libc++ tests pass on native 32-bit x86. Tested on openSUSE Tumbleweed i686.

@hvdijk
Copy link
Contributor

hvdijk commented May 14, 2021

I created https://reviews.llvm.org/D102359 to fix these, plus one more test.

@ldionne
Copy link
Member

ldionne commented May 31, 2021

This should be fixed now (thanks Harald!):

commit 73cdc75
Author: Harald van Dijk harald@gigawatt.nl
Date: Mon May 31 12:36:57 2021 -0400

[libc++] [test] Fix a few tests for 32-bit x86

Fixes bug llvm/llvm-project#48283 .

Differential Revision: https://reviews.llvm.org/D102359

@hvdijk
Copy link
Contributor

hvdijk commented May 31, 2021

Thanks for committing! Reopening as this is marked for 12.0.1; Tom, do you want to cherry-pick this into the 12.x branch?

@tstellar
Copy link
Collaborator

tstellar commented Jun 5, 2021

Merged: f1b1151

@tstellar
Copy link
Collaborator

mentioned in issue #48661

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

5 participants