[Lldb-commits] [lldb] (lldb) (minor) Correctly fix a usage of `PATH_MAX` (PR #104502)

via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 15 14:32:11 PDT 2024


================
@@ -54,7 +53,7 @@ RealpathPrefixes::ResolveSymlinks(const FileSpec &file_spec) {
       LLDB_LOGF(log, "Realpath'ing support file %s", file_spec_path.c_str());
 
       // One prefix matched. Try to realpath.
-      llvm::SmallString<PATH_MAX> buff;
+      llvm::SmallString<1024> buff;
----------------
royitaqi wrote:

It's a good callout for code to share the same small initial value by defining a common constant.

But I think it's your call as to what value this should be (64, 128 or 256?). I can add the constant and use it here once you decide.

I can search the code base and see what is the most common value used and update the patch with this value as a recommendation.

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


More information about the lldb-commits mailing list