[compiler-rt] [HWASan] Compatible with Windows path retrieval (PR #172194)

via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 13 20:07:21 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

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

Author: None (GkvJwa)

<details>
<summary>Changes</summary>

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
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'] + '/')
 

``````````

</details>


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


More information about the llvm-commits mailing list