This is an archive of the discontinued LLVM Phabricator instance.

getMainExecutable: handle realpath() failure, falling back to getprogpath().
ClosedPublic

Authored by sammccall on Jul 2 2019, 4:53 AM.

Details

Summary

Previously, we'd pass a nullptr to std::string and crash().

This case happens when the binary is deleted while being used (e.g. rebuilding clangd).

Diff Detail

Repository
rL LLVM

Event Timeline

sammccall created this revision.Jul 2 2019, 4:53 AM
kadircet accepted this revision.Jul 2 2019, 8:40 AM

LGTM, thanks!

This revision is now accepted and ready to land.Jul 2 2019, 8:40 AM
This revision was automatically updated to reflect the committed changes.