mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 01:38:30 +00:00
Implement more security stuff
- Support deterministic stacks on OpenBSD - Support OpenBSD system call origin verification - Fix overrun by one in chibicc string token allocator - Get all chibicc tests passing under Address Sanitizer
This commit is contained in:
parent
cbfd4ccd1e
commit
c843243322
56 changed files with 376 additions and 245 deletions
2
third_party/chibicc/tokenize.c
vendored
2
third_party/chibicc/tokenize.c
vendored
|
@ -275,7 +275,7 @@ static Token *read_string_literal(char *start, char *quote) {
|
|||
// is called a "surrogate pair".
|
||||
static Token *read_utf16_string_literal(char *start, char *quote) {
|
||||
char *end = string_literal_end(quote + 1);
|
||||
uint16_t *buf = calloc(2, end - start - 1);
|
||||
uint16_t *buf = calloc(2, end - start);
|
||||
int len = 0;
|
||||
for (char *p = quote + 1; p < end;) {
|
||||
if (*p == '\\') {
|
||||
|
|
7
third_party/third_party.mk
vendored
7
third_party/third_party.mk
vendored
|
@ -1,15 +1,10 @@
|
|||
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
|
||||
#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘
|
||||
|
||||
# TODO(jart): make chibicc compiled chibicc work with asan runtime
|
||||
ifneq ($(MODE),dbg)
|
||||
THIRD_PARTY_CHIBICC_XXX = o/$(MODE)/third_party/chibicc
|
||||
endif
|
||||
|
||||
.PHONY: o/$(MODE)/third_party
|
||||
o/$(MODE)/third_party: \
|
||||
o/$(MODE)/third_party/blas \
|
||||
$(THIRD_PARTY_CHIBICC_XXX) \
|
||||
o/$(MODE)/third_party/chibicc \
|
||||
o/$(MODE)/third_party/compiler_rt \
|
||||
o/$(MODE)/third_party/dlmalloc \
|
||||
o/$(MODE)/third_party/gdtoa \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue