More verbose errors logging for libcoreclr.so
authorKirill Frolov <k.frolov@samsung.com>
Mon, 23 Sep 2019 18:46:11 +0000 (21:46 +0300)
committerAlexander Soldatov/AI Compiler Lab /SRR/Staff Engineer/삼성전자 <soldatov.a@samsung.com>
Tue, 24 Sep 2019 11:48:32 +0000 (14:48 +0300)
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

index 75a0341..713ff0c 100644 (file)
@@ -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;
        }