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

SPARC lacks support for over-aligned dynamic alloca #57626

Closed
rorth opened this issue Sep 8, 2022 · 11 comments
Closed

SPARC lacks support for over-aligned dynamic alloca #57626

rorth opened this issue Sep 8, 2022 · 11 comments

Comments

@rorth
Copy link
Collaborator

rorth commented Sep 8, 2022

The SPARC backend lacks support for over-aligned dynamic alloca. So far, I've encountered the issue in the testsuite (D133493:

FAILED: MultiSource/UnitTests/C++11/frame_layout/CMakeFiles/frame_layout.dir/frame_layout.cpp.o
[...]
fatal error: error in backend: Function "_Z10test_frameILj4096ELb1ELj2048ELb0ELb0EJEEvDpT4_jPKcP13trace_elementd": over-aligned dynamic alloca not supported.
void test_frame<4096u, true, 2048u, false, false>(, unsigned int, char const*, trace_element*, double)

Additionally, it breaks asan support with several instances of the same issue:

      4 fatal error: error in backend: Function "_Z21MemSetOOBTestTemplateIcEvj": over-aligned dynamic alloca not supported.
      3 fatal error: error in backend: Function "_Z21StrLenOOBTestTemplatePcjN12_GLOBAL__N_17OOBKindE": over-aligned dynamic alloca not supported.
      4 fatal error: error in backend: Function "_Z24asan_write_sized_alignedPhj": over-aligned dynamic alloca not supported.
      4 fatal error: error in backend: Function "_ZN48AddressSanitizerInternalInterface_SetShadow_Test8TestBodyEv": over-aligned dynamic alloca not supported.
      4 fatal error: error in backend: Function "_ZN52AddressSanitizer_HasFeatureAddressSanitizerTest_Test8TestBodyEv": over-aligned dynamic alloca not supported.
      4 fatal error: error in backend: Function "_ZN56AddressSanitizerInterface_GetEstimatedAllocatedSize_Test8TestBodyEv": over-aligned dynamic alloca not supported.
      4 fatal error: error in backend: Function "_ZN7testing8internal16BoolFromGTestEnvEPKcb": over-aligned dynamic alloca not supported.
      3 fatal error: error in backend: Function "main": over-aligned dynamic alloca not supported.

which caused be to disable asan completely.

This puts clang at a considerable advantage to gcc which handles both just fine.

@rorth
Copy link
Collaborator Author

rorth commented Sep 8, 2022

/cherry-pick 83de0f31e66f1d1a9706b8e057475efd3ea1ed3a

@llvmbot
Copy link
Collaborator

llvmbot commented Sep 8, 2022

Failed to cherry-pick: 83de0f31e66f1d1a9706b8e057475efd3ea1ed3a

https://github.com/llvm/llvm-project/actions/runs/3016468488

Please manually backport the fix and push it to your github fork. Once this is done, please add a comment like this:

/branch <user>/<repo>/<branch>

@rorth
Copy link
Collaborator Author

rorth commented Sep 8, 2022

The commit hash is for the llvm-test-suite repo, not llvm-project. How would I request a backport there? I don't believe a fork is necessary here.

@tru
Copy link
Collaborator

tru commented Sep 10, 2022

You can just manually cherry-pick it over to the release/15.x branch for the test-suite.

@rorth
Copy link
Collaborator Author

rorth commented Sep 10, 2022

... which would have required approval first ;-) Alternatively, I've now created a fork before seeing your message:

/branch rorth/llvm-test-suite/issue57626

@llvmbot
Copy link
Collaborator

llvmbot commented Sep 10, 2022

/pull-request llvm/llvm-project-release-prs#152

@rorth
Copy link
Collaborator Author

rorth commented Sep 10, 2022

Seems I shouldn't go near the keyboard during weekends, especially with git being as unintuitive as ever and me being ignorant of git ;-( Here's a new branch based on release/15.x with only my patch:

/branch rorth/llvm-test-suite/issue57626-15.x

@llvmbot
Copy link
Collaborator

llvmbot commented Sep 10, 2022

/pull-request llvm/llvm-project-release-prs#153

@tru
Copy link
Collaborator

tru commented Sep 12, 2022

Seems like you still didn't get it correct @rorth - try going to your branch and run git reset --hard origin/release/15.x then do git cherry-pick <sha>

@tru
Copy link
Collaborator

tru commented Sep 12, 2022

Ah but wait - the test-suite doesn't work with the bot at all it only works with the llvm-project repo. You need to push that fix manually instead.

@rorth
Copy link
Collaborator Author

rorth commented Sep 12, 2022

Ah, I see. Done now, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment