This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Change overloaded function name append.
ClosedPublic

Authored by cferris on Jun 20 2023, 5:50 PM.

Details

Summary

The ScopedString class has two functions named append. One takes
a va_list, but on some platforms va_list is typedef'd to char*.
That means that this call:

std::string value;
Str.append("print this string %s", value.c_str());

The compiler can incorrectly think this is the va_list function,
leading to crashes when calling this. To fix this, change the name
of the va_list function to be vappend to avoid this.

Fix https://github.com/llvm/llvm-project/issues/62893

Diff Detail

Event Timeline

cferris created this revision.Jun 20 2023, 5:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2023, 5:50 PM
Herald added subscribers: yaneury, Enna1. · View Herald Transcript
cferris requested review of this revision.Jun 20 2023, 5:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2023, 5:50 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
Chia-hungDuan accepted this revision.Jun 20 2023, 8:34 PM
This revision is now accepted and ready to land.Jun 20 2023, 8:34 PM
cferris updated this revision to Diff 533406.Jun 21 2023, 2:34 PM

Missed a couple of calls that should be vappend.

Chia-hungDuan accepted this revision.Jun 21 2023, 3:07 PM
This revision was automatically updated to reflect the committed changes.