Skip to content

Conversation

4a6f656c
Copy link
Contributor

The executable and heap range for RISC-V sv48 VMA is supposed to end at
0xe000000000, rather than 0x0e00000000 as currently configured.

The executable and heap range for RISC-V sv48 VMA is supposed to end
at 0xe000000000, rather than 0x0e00000000 as currently configured.
Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot
Copy link
Member

llvmbot commented Aug 21, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Joel Sing (4a6f656c)

Changes

The executable and heap range for RISC-V sv48 VMA is supposed to end at
0xe000000000, rather than 0x0e00000000 as currently configured.


Full diff: https://github.com/llvm/llvm-project/pull/154700.diff

1 Files Affected:

  • (modified) compiler-rt/lib/tsan/rtl/tsan_platform.h (+1-1)
diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform.h b/compiler-rt/lib/tsan/rtl/tsan_platform.h
index ada594bc11fc7..66469afbc51bb 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_platform.h
+++ b/compiler-rt/lib/tsan/rtl/tsan_platform.h
@@ -695,7 +695,7 @@ struct MappingGoRiscv64 {
   static const uptr kShadowBeg = 0x200000000000ull;
   static const uptr kShadowEnd = 0x240000000000ull;
   static const uptr kLoAppMemBeg = 0x000000010000ull;
-  static const uptr kLoAppMemEnd = 0x000e00000000ull;
+  static const uptr kLoAppMemEnd = 0x00e000000000ull;
   static const uptr kMidAppMemBeg = 0;
   static const uptr kMidAppMemEnd = 0;
   static const uptr kHiAppMemBeg = 0;

@4a6f656c
Copy link
Contributor Author

@mengzhuo @wangpc-pp

Copy link
Contributor

@thurstond thurstond left a comment

Choose a reason for hiding this comment

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

Drive-by comment, not necessary to fix in this patch: the shadow and metainfo regions are unnecessarily large relative to the app region (they only need to be 2x and 0.5x in size respectively).

Copy link
Contributor

@wangpc-pp wangpc-pp left a comment

Choose a reason for hiding this comment

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

LGTM.

4a6f656c added a commit to 4a6f656c/llvm-project that referenced this pull request Aug 23, 2025
As pointed out during review of PR llvm#154700, the shadow allocation
only needs to be 2x the app region and the metainfo allocation only
needs to be 0.5x the app region. Reduce these accordingly.
@thurstond thurstond merged commit 5886a27 into llvm:main Aug 25, 2025
13 checks passed
Copy link

@4a6f656c Congratulations on having your first Pull Request (PR) merged into the LLVM Project!

Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail here.

If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are working as expected, well done!

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

Successfully merging this pull request may close these issues.

4 participants