diff --git a/libc/calls/gethoststxtpath.c b/libc/calls/gethoststxtpath.c index b80f28a2d..579f973a9 100644 --- a/libc/calls/gethoststxtpath.c +++ b/libc/calls/gethoststxtpath.c @@ -23,6 +23,6 @@ const char *GetHostsTxtPath(char *path, size_t size) { if (!IsWindows()) { return "/etc/hosts"; } else { - return GetSystemDirectoryPath(path, "drivers\\etc\\hosts", size); + return GetSystemDirectoryPath(path, "\\drivers\\etc\\hosts", size); } } diff --git a/libc/calls/getprotocolstxtpath.c b/libc/calls/getprotocolstxtpath.c index 782ba5633..2d31368bf 100644 --- a/libc/calls/getprotocolstxtpath.c +++ b/libc/calls/getprotocolstxtpath.c @@ -23,6 +23,6 @@ const char *GetProtocolsTxtPath(char *buf, size_t size) { if (!IsWindows()) { return "/etc/protocols"; } else { - return GetSystemDirectoryPath(buf, "drivers\\etc\\protocol", size); + return GetSystemDirectoryPath(buf, "\\drivers\\etc\\protocol", size); } } diff --git a/libc/calls/getservicestxtpath.c b/libc/calls/getservicestxtpath.c index dae496cc2..765255b4f 100644 --- a/libc/calls/getservicestxtpath.c +++ b/libc/calls/getservicestxtpath.c @@ -23,6 +23,6 @@ const char *GetServicesTxtPath(char *path, size_t size) { if (!IsWindows()) { return "/etc/services"; } else { - return GetSystemDirectoryPath(path, "drivers\\etc\\services", size); + return GetSystemDirectoryPath(path, "\\drivers\\etc\\services", size); } } diff --git a/libc/calls/sig.c b/libc/calls/sig.c index 628d7a01e..586e74f8a 100644 --- a/libc/calls/sig.c +++ b/libc/calls/sig.c @@ -33,6 +33,7 @@ #include "libc/intrin/describebacktrace.internal.h" #include "libc/intrin/dll.h" #include "libc/intrin/strace.internal.h" +#include "libc/intrin/weaken.h" #include "libc/nt/console.h" #include "libc/nt/enum/context.h" #include "libc/nt/enum/exceptionhandleractions.h" @@ -43,6 +44,7 @@ #include "libc/nt/struct/ntexceptionpointers.h" #include "libc/nt/synchronization.h" #include "libc/nt/thread.h" +#include "libc/runtime/symbols.internal.h" #include "libc/str/str.h" #include "libc/sysv/consts/sa.h" #include "libc/sysv/consts/sicode.h" @@ -525,7 +527,9 @@ static void __sig_unmaskable(struct NtExceptionPointers *ep, int code, int sig, // otherwise it'll print a warning message about the lack of stack mem STRACE("win32 vectored exception 0x%08Xu raising %G " "cosmoaddr2line %s %lx %s", - ep->ExceptionRecord->ExceptionCode, sig, program_invocation_name, + ep->ExceptionRecord->ExceptionCode, sig, + _weaken(FindDebugBinary) ? _weaken(FindDebugBinary)() + : program_invocation_name, ep->ContextRecord->Rip, DescribeBacktrace((struct StackFrame *)ep->ContextRecord->Rbp)); diff --git a/libc/stdio/printargs.c b/libc/stdio/printargs.c index 44876ebad..fa38e6ebf 100644 --- a/libc/stdio/printargs.c +++ b/libc/stdio/printargs.c @@ -445,6 +445,9 @@ textstartup void __printargs(const char *prologue) { PRINT(" ☼ %s = %#s", "kNtWindowsDirectory", kNtWindowsDirectory); #endif PRINT(" ☼ %s = %#s", "__argv[0]", __argv[0]); + PRINT(" ☼ %s = %#s", "program_invocation_name", program_invocation_name); + PRINT(" ☼ %s = %#s", "program_invocation_short_name", + program_invocation_short_name); PRINT(" ☼ %s = %#s", "getenv(\"_\")", getenv("_")); PRINT(" ☼ %s = %#s", "getauxval(AT_EXECFN)", getauxval(AT_EXECFN)); PRINT(" ☼ %s = %#s", "GetProgramExecutableName", GetProgramExecutableName()); diff --git a/third_party/musl/resolvconf.c b/third_party/musl/resolvconf.c index e17a5504f..bdcfbc719 100644 --- a/third_party/musl/resolvconf.c +++ b/third_party/musl/resolvconf.c @@ -63,6 +63,7 @@ static dontinline textwindows int __get_resolv_conf_nt(struct resolvconf *conf) return __winerr(); } + conf->nns = 0; for (i = 0; i < keycount; ++i) { char value8[128]; uint32_t valuebytes, uuidlen;