From dc05d06bd28f3a91e84b1dbfd37158621424df0a Mon Sep 17 00:00:00 2001 From: Kirill Frolov Date: Mon, 23 Sep 2019 21:46:11 +0300 Subject: [PATCH] More verbose errors logging for libcoreclr.so See https://github.sec.samsung.net/dotnet/home/issues/328 In case of EPERM error write error reason to log. --- NativeLauncher/launcher/dotnet/dotnet_launcher.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc index 75a0341..713ff0c 100644 --- a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc +++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc @@ -374,6 +374,8 @@ int CoreRuntime::initialize(bool standalone) if (__coreclrLib == nullptr) { char *err = dlerror(); _ERR("dlopen failed to open libcoreclr.so with error %s", err); + if (access(libCoreclr.c_str(), R_OK) == -1) + _ERR("access '%s': %s\n", libCoreclr.c_str(), strerror(errno)); return -1; } -- 2.7.4