mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
Make more fixes and improvements
This change attempts to fix some report build issues. It also builds upon development work described in previous changes.
This commit is contained in:
parent
9bfa6ec06e
commit
9d61e23c80
27 changed files with 980 additions and 902 deletions
|
@ -1287,7 +1287,7 @@ struct bpf_spin_lock {
|
|||
};
|
||||
|
||||
struct bpf_sysctl {
|
||||
uint32_t write;
|
||||
uint32_t write_;
|
||||
uint32_t file_pos;
|
||||
};
|
||||
|
||||
|
|
|
@ -599,6 +599,8 @@ syscon sicode POLL_MSG 3 3 3 3 3 3 # SIGIO; input message availab
|
|||
syscon sicode POLL_ERR 4 4 4 4 4 4 # SIGIO; i/o error; unix consensus
|
||||
syscon sicode POLL_PRI 5 5 5 5 5 5 # SIGIO; high priority input available; unix consensus
|
||||
syscon sicode POLL_HUP 6 6 6 6 6 6 # SIGIO; device disconnected; unix consensus
|
||||
syscon sicode SYS_SECCOMP 1 -1 -1 -1 -1 -1 # SIGSYS; seccomp triggered
|
||||
syscon sicode SYS_USER_DISPATCH 2 -1 -1 -1 -1 -1 # SIGSYS; syscall user dispatch triggered
|
||||
|
||||
# sigaltstack() values
|
||||
#
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon reboot,RB_DISABLE_CAD,0,-1,-1,-1,-1,-1
|
||||
.syscon reboot,RB_DISABLE_CAD,0,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon reboot,RB_ENABLE_CAD,0x89abcdef,-1,-1,-1,-1,-1
|
||||
.syscon reboot,RB_ENABLE_CAD,0x89abcdef,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon reboot,RB_KEXEC,0x45584543,-1,-1,-1,-1,-1
|
||||
.syscon reboot,RB_KEXEC,0x45584543,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon reboot,RB_POWERDOWN,0x4321fedc,-1,0x4000,0x1000,0x808,8
|
||||
.syscon reboot,RB_POWERDOWN,0x4321fedc,0xffffffff,0x4000,0x1000,0x808,8
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon reboot,RB_POWEROFF,0x4321fedc,-1,0x4000,0x1000,0x808,8
|
||||
.syscon reboot,RB_POWEROFF,0x4321fedc,0xffffffff,0x4000,0x1000,0x808,8
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon reboot,RB_POWER_OFF,0x4321fedc,-1,0x4000,0x1000,0x808,8
|
||||
.syscon reboot,RB_POWER_OFF,0x4321fedc,0xffffffff,0x4000,0x1000,0x808,8
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon reboot,RB_SW_SUSPEND,0xd000fce2,-1,-1,-1,-1,0xd000fce2
|
||||
.syscon reboot,RB_SW_SUSPEND,0xd000fce2,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd000fce2
|
||||
|
|
2
libc/sysv/consts/SYS_SECCOMP.S
Normal file
2
libc/sysv/consts/SYS_SECCOMP.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sicode,SYS_SECCOMP,1,-1,-1,-1,-1,-1
|
2
libc/sysv/consts/SYS_USER_DISPATCH.S
Normal file
2
libc/sysv/consts/SYS_USER_DISPATCH.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon sicode,SYS_USER_DISPATCH,2,-1,-1,-1,-1,-1
|
|
@ -52,6 +52,8 @@ extern const long POLL_MSG;
|
|||
extern const long POLL_ERR;
|
||||
extern const long POLL_PRI;
|
||||
extern const long POLL_HUP;
|
||||
extern const long SYS_SECCOMP;
|
||||
extern const long SYS_USER_DISPATCH;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
@ -80,30 +82,32 @@ COSMOPOLITAN_C_END_
|
|||
#define POLL_PRI LITERALLY(5)
|
||||
#define POLL_HUP LITERALLY(6)
|
||||
|
||||
#define SI_USER SYMBOLIC(SI_USER)
|
||||
#define SI_QUEUE SYMBOLIC(SI_QUEUE)
|
||||
#define SI_TIMER SYMBOLIC(SI_TIMER)
|
||||
#define SI_MESGQ SYMBOLIC(SI_MESGQ)
|
||||
#define SI_ASYNCIO SYMBOLIC(SI_ASYNCIO)
|
||||
#define SI_TKILL SYMBOLIC(SI_TKILL)
|
||||
#define SI_ASYNCNL SYMBOLIC(SI_ASYNCNL)
|
||||
#define SI_KERNEL SYMBOLIC(SI_KERNEL)
|
||||
#define SI_NOINFO SYMBOLIC(SI_NOINFO)
|
||||
#define SEGV_PKUERR SYMBOLIC(SEGV_PKUERR)
|
||||
#define FPE_INTDIV SYMBOLIC(FPE_INTDIV)
|
||||
#define FPE_INTOVF SYMBOLIC(FPE_INTOVF)
|
||||
#define FPE_FLTDIV SYMBOLIC(FPE_FLTDIV)
|
||||
#define FPE_FLTOVF SYMBOLIC(FPE_FLTOVF)
|
||||
#define FPE_FLTUND SYMBOLIC(FPE_FLTUND)
|
||||
#define FPE_FLTRES SYMBOLIC(FPE_FLTRES)
|
||||
#define FPE_FLTINV SYMBOLIC(FPE_FLTINV)
|
||||
#define FPE_FLTSUB SYMBOLIC(FPE_FLTSUB)
|
||||
#define ILL_ILLOPN SYMBOLIC(ILL_ILLOPN)
|
||||
#define ILL_ILLADR SYMBOLIC(ILL_ILLADR)
|
||||
#define ILL_ILLTRP SYMBOLIC(ILL_ILLTRP)
|
||||
#define ILL_PRVOPC SYMBOLIC(ILL_PRVOPC)
|
||||
#define BUS_OOMERR SYMBOLIC(BUS_OOMERR)
|
||||
#define BUS_MCEERR_AR SYMBOLIC(BUS_MCEERR_AR)
|
||||
#define BUS_MCEERR_AO SYMBOLIC(BUS_MCEERR_AO)
|
||||
#define SI_USER SYMBOLIC(SI_USER)
|
||||
#define SI_QUEUE SYMBOLIC(SI_QUEUE)
|
||||
#define SI_TIMER SYMBOLIC(SI_TIMER)
|
||||
#define SI_MESGQ SYMBOLIC(SI_MESGQ)
|
||||
#define SI_ASYNCIO SYMBOLIC(SI_ASYNCIO)
|
||||
#define SI_TKILL SYMBOLIC(SI_TKILL)
|
||||
#define SI_ASYNCNL SYMBOLIC(SI_ASYNCNL)
|
||||
#define SI_KERNEL SYMBOLIC(SI_KERNEL)
|
||||
#define SI_NOINFO SYMBOLIC(SI_NOINFO)
|
||||
#define SEGV_PKUERR SYMBOLIC(SEGV_PKUERR)
|
||||
#define FPE_INTDIV SYMBOLIC(FPE_INTDIV)
|
||||
#define FPE_INTOVF SYMBOLIC(FPE_INTOVF)
|
||||
#define FPE_FLTDIV SYMBOLIC(FPE_FLTDIV)
|
||||
#define FPE_FLTOVF SYMBOLIC(FPE_FLTOVF)
|
||||
#define FPE_FLTUND SYMBOLIC(FPE_FLTUND)
|
||||
#define FPE_FLTRES SYMBOLIC(FPE_FLTRES)
|
||||
#define FPE_FLTINV SYMBOLIC(FPE_FLTINV)
|
||||
#define FPE_FLTSUB SYMBOLIC(FPE_FLTSUB)
|
||||
#define ILL_ILLOPN SYMBOLIC(ILL_ILLOPN)
|
||||
#define ILL_ILLADR SYMBOLIC(ILL_ILLADR)
|
||||
#define ILL_ILLTRP SYMBOLIC(ILL_ILLTRP)
|
||||
#define ILL_PRVOPC SYMBOLIC(ILL_PRVOPC)
|
||||
#define BUS_OOMERR SYMBOLIC(BUS_OOMERR)
|
||||
#define BUS_MCEERR_AR SYMBOLIC(BUS_MCEERR_AR)
|
||||
#define BUS_MCEERR_AO SYMBOLIC(BUS_MCEERR_AO)
|
||||
#define SYS_SECCOMP SYMBOLIC(SYS_SECCOMP)
|
||||
#define SYS_USER_DISPATCH SYMBOLIC(SYS_USER_DISPATCH)
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_SICODE_H_ */
|
||||
|
|
|
@ -148,19 +148,6 @@ noasan int main(int argc, char *argv[]) {
|
|||
EmptySignalMask();
|
||||
ShowCrashReports();
|
||||
|
||||
// so the test runner can terminate unknown children without
|
||||
// accidentally killing parent processes
|
||||
if (!IsWindows() && weaken(fork)) {
|
||||
setpgrp();
|
||||
}
|
||||
|
||||
// prevent runaway tests from bombing the computer
|
||||
cpus = GetCpuCount();
|
||||
cpus = MAX(4, cpus);
|
||||
SetLimit(RLIMIT_NOFILE, 32, 128);
|
||||
SetLimit(RLIMIT_SIGPENDING, 16, 16384);
|
||||
SetLimit(RLIMIT_NPROC, cpus * 8, 2048);
|
||||
|
||||
// now get down to business
|
||||
g_testlib_shoulddebugbreak = IsDebuggerPresent(false);
|
||||
if (!IsWindows()) sys_getpid(); // make strace easier to read
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue