Skip to content

Conversation

@GkvJwa
Copy link
Contributor

@GkvJwa GkvJwa commented Dec 14, 2025

Fix #134853

Since the Windows path separator is typically \\, replace it with /.

@llvmbot
Copy link
Member

llvmbot commented Dec 14, 2025

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

Author: None (GkvJwa)

Changes

Fix #134853

Since the Windows path separator is typically \\, replace it with /.


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

1 Files Affected:

  • (modified) compiler-rt/lib/hwasan/scripts/hwasan_symbolize (+1-1)
diff --git a/compiler-rt/lib/hwasan/scripts/hwasan_symbolize b/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
index 19d948d1f0aaa..efc7c868696c3 100755
--- a/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
+++ b/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
@@ -476,7 +476,7 @@ def main():
   # Source location.
   paths_to_cut = args.source or []
   if not paths_to_cut:
-    paths_to_cut.append(os.getcwd() + '/')
+    paths_to_cut.append(os.getcwd().replace('\\', '/') + '/')
     if 'ANDROID_BUILD_TOP' in os.environ:
       paths_to_cut.append(os.environ['ANDROID_BUILD_TOP'] + '/')
 

@GkvJwa GkvJwa requested review from cjappl and fmayer December 14, 2025 04:07
@GkvJwa
Copy link
Contributor Author

GkvJwa commented Dec 14, 2025

Hello, @fmayer @cjappl If you have some free time, could you please review it

paths_to_cut = args.source or []
if not paths_to_cut:
paths_to_cut.append(os.getcwd() + '/')
paths_to_cut.append(os.getcwd().replace('\\', '/') + '/')
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is python3, can we just use pathlib? I think they deal with the platform specific separators in a nice abstracted way

@cjappl cjappl requested a review from eugenis December 14, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[compiler-rt] hwasan_symbolize Windows bug

3 participants