Avoid stat
-ing stdlib path if it's unreadable
#55980
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This seems to fix #55966 for me on v1.10:
It's hard to make a proper test for this because it requires fiddling with the build directory, which for from-source builds is likely needed and you don't want to mess with it, and in general may require admin access.
I'll make a separate PR for
master
, as sketched in #55966 (comment), I started from v1.10 because that's the only version where I can reliably reproduce the issue, and so test it locally easily. Also, the code around these lines is changed in v1.11, so this would need a manual backport in any case.