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

macos profile runtime test failures due to new ld warning on overaligned sections #88053

Open
aeubanks opened this issue Apr 8, 2024 · 0 comments

Comments

@aeubanks
Copy link
Contributor

aeubanks commented Apr 8, 2024

With a new Apple ld, we're seeing these two tests fail on both x86-64 and arm64:

 Failed Tests (2):
   Profile-x86_64 :: ContinuousSyncMode/darwin-proof-of-concept.c
   Profile-x86_64 :: instrprof-darwin-exports.c

e.g.

 FAIL: Profile-x86_64 :: ContinuousSyncMode/darwin-proof-of-concept.c (71302 of 74416)
 ******************** TEST 'Profile-x86_64 :: ContinuousSyncMode/darwin-proof-of-concept.c' FAILED ********************
 Exit Code: 1
 
 Command Output (stderr):
 --
 RUN: at line 10: /Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/./bin/clang   -arch x86_64  -mmacosx-version-min=10.13 -isysroot /Volumes/Work/s/w/ir/cache/osx_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -mlinker-version=1053.12  -g -o /Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/ContinuousSyncMode/Output/darwin-proof-of-concept.c.tmp /Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/profile/ContinuousSyncMode/darwin-proof-of-concept.c    -Wl,-sectalign,__DATA,__pcnts,0x4000    -Wl,-sectalign,__DATA,__pdata,0x4000
 + /Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/./bin/clang -arch x86_64 -mmacosx-version-min=10.13 -isysroot /Volumes/Work/s/w/ir/cache/osx_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -mlinker-version=1053.12 -g -o /Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/ContinuousSyncMode/Output/darwin-proof-of-concept.c.tmp /Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/test/profile/ContinuousSyncMode/darwin-proof-of-concept.c -Wl,-sectalign,__DATA,__pcnts,0x4000 -Wl,-sectalign,__DATA,__pdata,0x4000
 ld: warning: reducing alignment of section __DATA,__pcnts from 0x4000 to 0x1000 because it exceeds segment maximum alignment
 ld: warning: reducing alignment of section __DATA,__pdata from 0x4000 to 0x1000 because it exceeds segment maximum alignment
 RUN: at line 15: /Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/ContinuousSyncMode/Output/darwin-proof-of-concept.c.tmp create /Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/ContinuousSyncMode/Output/darwin-proof-of-concept.c.tmp.tmpfile
 + /Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/ContinuousSyncMode/Output/darwin-proof-of-concept.c.tmp create /Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/ContinuousSyncMode/Output/darwin-proof-of-concept.c.tmp.tmpfile
 __pdata not ordered after __pcnts.
 
 --

 FAIL: Profile-x86_64 :: instrprof-darwin-exports.c (71383 of 74416)
 ******************** TEST 'Profile-x86_64 :: instrprof-darwin-exports.c' FAILED ********************
 Exit Code: 1
 
 Command Output (stdout):
 --
 ld: warning: reducing alignment of section __DATA,__llvm_prf_cnts from 0x4000 to 0x1000 because it exceeds segment maximum alignment
 ld: warning: reducing alignment of section __DATA,__llvm_prf_data from 0x4000 to 0x1000 because it exceeds segment maximum alignment
 ld: warning: reducing alignment of section __DATA,__llvm_prf_bits from 0x4000 to 0x1000 because it exceeds segment maximum alignment
 ld: warning: reducing alignment of section __DATA,__llvm_prf_cnts from 0x4000 to 0x1000 because it exceeds segment maximum alignment
 ld: warning: reducing alignment of section __DATA,__llvm_prf_data from 0x4000 to 0x1000 because it exceeds segment maximum alignment
 ld: warning: reducing alignment of section __DATA,__llvm_prf_bits from 0x4000 to 0x1000 because it exceeds segment maximum alignment
 
 --

I believe both these test failures are due to some page size/alignment changes.

clang tells ld to set alignment here

@vedantk

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

No branches or pull requests

2 participants