mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Fix a bunch of Windows bugs reported on Discord
This change addresses everything from stack smashing to %SYSTEMROOT% breaking socket(). Issues relating to compile.com not reporting text printed to stderr has been resolved for Windows builds.
This commit is contained in:
parent
b0e3258709
commit
5018171fa5
10 changed files with 104 additions and 46 deletions
|
@ -24,6 +24,7 @@
|
|||
#include "libc/log/log.h"
|
||||
#include "libc/mem/gc.internal.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sock/sock.h"
|
||||
#include "libc/sock/struct/ifconf.h"
|
||||
#include "libc/sock/struct/ifreq.h"
|
||||
|
@ -32,6 +33,7 @@
|
|||
#include "libc/sysv/consts/ipproto.h"
|
||||
#include "libc/sysv/consts/sio.h"
|
||||
#include "libc/sysv/consts/sock.h"
|
||||
#include "libc/testlib/subprocess.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
|
||||
TEST(siocgifconf, test) {
|
||||
|
@ -70,3 +72,12 @@ TEST(siocgifconf, test) {
|
|||
EXPECT_TRUE(foundloopback);
|
||||
ASSERT_NE(-1, close(socketfd));
|
||||
}
|
||||
|
||||
TEST(siocgifconf, mkntenvblock_systemroot) {
|
||||
if (__argc != 1) return;
|
||||
SPAWN(fork);
|
||||
execve(GetProgramExecutableName(),
|
||||
(char *[]){GetProgramExecutableName(), "hi", NULL}, (char *[]){NULL});
|
||||
abort();
|
||||
EXITS(0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue