Skip to content

Update compiler-rt to LLVM 20.1.4#24357

Merged
aheejin merged 12 commits intoemscripten-core:mainfrom
aheejin:update_compiler_rt_20
May 22, 2025
Merged

Update compiler-rt to LLVM 20.1.4#24357
aheejin merged 12 commits intoemscripten-core:mainfrom
aheejin:update_compiler_rt_20

Conversation

@aheejin
Copy link
Member

@aheejin aheejin commented May 17, 2025

This updates compiler-rt to LLVM 20.1.4.

Additional change:

  • Reflect GetThreadStackAndTls's API change: a463f5a
    In Reland "[sanitizer] Fix partially initialized static TLS range" llvm/llvm-project#108883, GetThreadStackAndTls's API changed from
    void GetThreadStackAndTls(bool main, uptr *stk_addr, uptr *stk_size,
                              uptr *tls_addr, uptr *tls_size);
    
    to
    void GetThreadStackAndTls(bool main, uptr *stk_begin, uptr *stk_end,
                              uptr *tls_begin, uptr *tls_end);
    
    So this fixes sanitizer_emscripten.cpp's GetThreadStackAndTls accordingly. Also this changes the variable names to match those of the header.

aheejin added 6 commits May 17, 2025 03:02
In llvm/llvm-project#108883,
`GetThreadStackAndTls`'s API changed from
```
void GetThreadStackAndTls(bool main, uptr *stk_addr, uptr *stk_size,
                          uptr *tls_addr, uptr *tls_size);
```
to
```
void GetThreadStackAndTls(bool main, uptr *stk_begin, uptr *stk_end,
                          uptr *tls_begin, uptr *tls_end);
```

So this fixes `sanitizer_emscripten.cpp`'s `GetThreadStackAndTls`
accordingly. Also this changes the variable names to match those of the
header
(https://github.com/llvm/llvm-project/blob/ec28b8f9cc7f2ac187d8a617a6d08d5e56f9120e/compiler-rt/lib/sanitizer_common/sanitizer_common.h#L86-L87)
This is an automatic change generated by tools/maint/rebaseline_tests.py.

The following (9) test expectation files were updated by
running the tests with `--rebaseline`:

```
other/codesize/test_codesize_cxx_ctors1.size: 129217 => 129319 [+102 bytes / +0.08%]
other/codesize/test_codesize_cxx_ctors2.size: 128610 => 128712 [+102 bytes / +0.08%]
other/codesize/test_codesize_cxx_except.size: 170838 => 170940 [+102 bytes / +0.06%]
other/codesize/test_codesize_cxx_except_wasm.size: 144593 => 144695 [+102 bytes / +0.07%]
other/codesize/test_codesize_cxx_except_wasm_legacy.size: 142168 => 142270 [+102 bytes / +0.07%]
other/codesize/test_codesize_cxx_lto.size: 121938 => 122042 [+104 bytes / +0.09%]
other/codesize/test_codesize_cxx_mangle.size: 232596 => 232698 [+102 bytes / +0.04%]
other/codesize/test_codesize_cxx_noexcept.size: 131780 => 131882 [+102 bytes / +0.08%]
other/codesize/test_codesize_cxx_wasmfs.size: 169161 => 169263 [+102 bytes / +0.06%]

Average change: +0.07% (+0.04% - +0.09%)
```
@aheejin
Copy link
Member Author

aheejin commented May 17, 2025

Ran all asan, lsan, and ubsan tests locally and these are the failing tests. But they fail in the main branch too. And the error messages don't look like sanitizer issues.

  • asan.test_dlfcn_jspi
  • asan.test_esm_integration
  • asan.test_esm_integration_main
  • asan.test_esm_integration_main_imported_memory
  • lsan.test_esm_integration

@aheejin aheejin marked this pull request as ready for review May 17, 2025 04:36
@aheejin aheejin requested a review from sbc100 May 17, 2025 04:36
@aheejin
Copy link
Member Author

aheejin commented May 17, 2025

The CI's test-esm-integration error says:

ERROR: could not find the following tests: esm-integration

Do you have any idea what this is about?

@sbc100
Copy link
Collaborator

sbc100 commented May 19, 2025

The CI's test-esm-integration error says:

ERROR: could not find the following tests: esm-integration

Do you have any idea what this is about?

Unrelated. Should be fixed on main now. Feel free to ignore it.

ChangeLog.md Outdated

4.0.9 (in development)
----------------------
- compiler-rt was updated to LLVM 20.1.4. (#24357)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to move now

aheejin added 3 commits May 21, 2025 23:26
This is an automatic change generated by tools/maint/rebaseline_tests.py.

The following (9) test expectation files were updated by
running the tests with `--rebaseline`:

```
other/codesize/test_codesize_cxx_ctors1.size: 129654 => 129756 [+102 bytes / +0.08%]
other/codesize/test_codesize_cxx_ctors2.size: 129039 => 129141 [+102 bytes / +0.08%]
other/codesize/test_codesize_cxx_except.size: 171324 => 171426 [+102 bytes / +0.06%]
other/codesize/test_codesize_cxx_except_wasm.size: 144770 => 144872 [+102 bytes / +0.07%]
other/codesize/test_codesize_cxx_except_wasm_legacy.size: 142360 => 142462 [+102 bytes / +0.07%]
other/codesize/test_codesize_cxx_lto.size: 121882 => 121986 [+104 bytes / +0.09%]
other/codesize/test_codesize_cxx_mangle.size: 235388 => 235490 [+102 bytes / +0.04%]
other/codesize/test_codesize_cxx_noexcept.size: 132027 => 132129 [+102 bytes / +0.08%]
other/codesize/test_codesize_cxx_wasmfs.size: 169897 => 169999 [+102 bytes / +0.06%]

Average change: +0.07% (+0.04% - +0.09%)
```
@aheejin aheejin merged commit 9e57126 into emscripten-core:main May 22, 2025
30 checks passed
@aheejin aheejin deleted the update_compiler_rt_20 branch May 22, 2025 05:52
Lukasdoe pushed a commit to Lukasdoe/emscripten that referenced this pull request Jun 19, 2025
This updates compiler-rt to LLVM 20.1.4.

Additional change:
- Reflect GetThreadStackAndTls's API change:
emscripten-core@a463f5a
In llvm/llvm-project#108883,
`GetThreadStackAndTls`'s API changed from
  ```
  void GetThreadStackAndTls(bool main, uptr *stk_addr, uptr *stk_size,
                            uptr *tls_addr, uptr *tls_size);
  ```
  to
  ```
  void GetThreadStackAndTls(bool main, uptr *stk_begin, uptr *stk_end,
                            uptr *tls_begin, uptr *tls_end);
  ```   
So this fixes `sanitizer_emscripten.cpp`'s `GetThreadStackAndTls`
accordingly. Also this changes the variable names to match those of the
header.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants