Validate privileged code relationships

- Work towards improving non-optimized build support
- Introduce MODE=zero which is -O0 without ASAN/UBSAN
- Use system GCC when ~/.cosmo.mk has USE_SYSTEM_TOOLCHAIN=1
- Have package.com check .privileged code doesn't call non-privileged
This commit is contained in:
Justine Tunney 2023-06-08 04:37:05 -07:00
parent 01fd655097
commit daf4454a06
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
82 changed files with 808 additions and 850 deletions

1
third_party/awk/b.c vendored
View file

@ -1214,6 +1214,7 @@ rescan:
}
break;
}
return 0; /* [jart] why wasn't this here? */
}
int cgoto(fa *f, int s, int c)

View file

@ -34,6 +34,7 @@
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/fileno.h"
#include "libc/sysv/consts/termios.h"
#include "third_party/ggml/llama.h"
#include "third_party/ggml/llama_util.h"
#include "third_party/libcxx/algorithm"

View file

@ -100,14 +100,6 @@ o/opt/third_party/ggml/ggml.o: private \
CFLAGS += \
-x-no-pg
ifeq ($(ARCH), x86_64)
o/rel/third_party/ggml/ggml.o \
o/opt/third_party/ggml/ggml.o: private \
CFLAGS += \
-fschedule-insns2 \
-mred-zone
endif
################################################################################
# command for running inference on large language models
# make -j8 o//third_party/ggml/llama.com

View file

@ -129,6 +129,7 @@
#include "third_party/linenoise/linenoise.h"
#include "libc/assert.h"
#include "libc/calls/calls.h"
#include "libc/calls/ioctl.h"
#include "libc/calls/sig.internal.h"
#include "libc/calls/struct/sigaction.h"
#include "libc/calls/struct/stat.h"

View file

@ -269,7 +269,7 @@ void test_sha512_valid_param_wrapper( void ** params )
void test_sha512_invalid_param( )
{
mbedtls_sha512_context ctx;
unsigned char buf[64] = { 0 };
unsigned char buf[128] = { 0 };
size_t const buflen = sizeof( buf );
int valid_type = 0;
int invalid_type = 42;

View file

@ -4,7 +4,7 @@
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
typedef atomic_uint_fast32_t nsync_atomic_uint32_;
#define nsync_atomic_uint32_ atomic_uint_fast32_t
#define NSYNC_ATOMIC_UINT32_INIT_ 0
#define NSYNC_ATOMIC_UINT32_LOAD_(p) (*(p))

View file

@ -5,9 +5,11 @@
https://docs.python.org/3/license.html │
*/
#define PY_SSIZE_T_CLEAN
#include "third_party/python/Modules/posixmodule.h"
#include "libc/assert.h"
#include "libc/calls/calls.h"
#include "libc/calls/internal.h"
#include "libc/calls/ioctl.h"
#include "libc/calls/makedev.h"
#include "libc/calls/struct/dirent.h"
#include "libc/calls/struct/iovec.h"
@ -56,6 +58,7 @@
#include "libc/sysv/consts/sf.h"
#include "libc/sysv/consts/sicode.h"
#include "libc/sysv/consts/st.h"
#include "libc/sysv/consts/termios.h"
#include "libc/sysv/consts/w.h"
#include "libc/sysv/consts/waitid.h"
#include "libc/sysv/errfuns.h"
@ -87,7 +90,6 @@
#include "third_party/python/Include/warnings.h"
#include "third_party/python/Include/yoink.h"
#include "third_party/python/Modules/_multiprocessing/multiprocessing.h"
#include "third_party/python/Modules/posixmodule.h"
#include "third_party/python/pyconfig.h"
/* clang-format off */

View file

@ -32,6 +32,8 @@
#include "libc/calls/struct/termios.h"
#include "libc/calls/termios.h"
#include "third_party/unzip/crypt.h"
#include "libc/sysv/consts/termios.h"
#include "libc/calls/ioctl.h"
#include "third_party/unzip/globals.h"
#if (CRYPT || (defined(UNZIP) && !defined(FUNZIP)))