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

[Sanitizer][NFC] Replaces a few InternalScopedString::AppendF with InternalScopedString::Append #80574

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

Enna1
Copy link
Contributor

@Enna1 Enna1 commented Feb 4, 2024

No description provided.

@llvmbot llvmbot added compiler-rt PGO Profile Guided Optimizations labels Feb 4, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Feb 4, 2024

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

@llvm/pr-subscribers-pgo

Author: Enna1 (Enna1)

Changes

…cribeThread


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

1 Files Affected:

  • (modified) compiler-rt/lib/memprof/memprof_descriptions.cpp (+1-1)
diff --git a/compiler-rt/lib/memprof/memprof_descriptions.cpp b/compiler-rt/lib/memprof/memprof_descriptions.cpp
index 48b74b6bc87fb..4fbe2943e6539 100644
--- a/compiler-rt/lib/memprof/memprof_descriptions.cpp
+++ b/compiler-rt/lib/memprof/memprof_descriptions.cpp
@@ -51,7 +51,7 @@ void DescribeThread(MemprofThreadContext *context) {
   InternalScopedString str;
   str.AppendF("Thread %s", MemprofThreadIdAndName(context).c_str());
   if (context->parent_tid == kInvalidTid) {
-    str.AppendF(" created by unknown thread\n");
+    str.Append(" created by unknown thread\n");
     Printf("%s", str.data());
     return;
   }

@Enna1 Enna1 changed the title [MemProf] Fix incorrect usage of InternalScopedString::appendF in Des… [MemProf][NFC] Fix incorrect usage of InternalScopedString::appendF in Des… Feb 4, 2024
@llvmbot llvmbot added compiler-rt:asan Address sanitizer compiler-rt:hwasan Hardware-assisted address sanitizer compiler-rt:sanitizer labels Feb 4, 2024
@Enna1
Copy link
Contributor Author

Enna1 commented Feb 4, 2024

Just realized there are InternalScopedString::AppendF called with no format specifier provided in other sanitizers code besides memprof.
So change this PR to replace InternalScopedString::AppendF with no format specifier provided with InternalScopedString::Append for all sanitizers.

@Enna1 Enna1 changed the title [MemProf][NFC] Fix incorrect usage of InternalScopedString::appendF in Des… [Sanitizer][NFC] Replaces a few InternalScopedString::AppendF with InternalScopedString::Append Feb 4, 2024
Copy link
Contributor

@fmayer fmayer left a comment

Choose a reason for hiding this comment

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

lgtm

@Enna1 Enna1 merged commit abe102b into main Feb 6, 2024
6 checks passed
@Enna1 Enna1 deleted the users/Enna1/memprof-fix-appendf branch February 6, 2024 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler-rt:asan Address sanitizer compiler-rt:hwasan Hardware-assisted address sanitizer compiler-rt:sanitizer compiler-rt PGO Profile Guided Optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants