Commit Graph

7 Commits (master)

Author SHA1 Message Date
cinap_lenrek 8ca102d42e cc: dont export gethunk(), hunk, nhunk and thunk 2020-05-12 23:18:48 +02:00
cinap_lenrek 0d59a2358a ?a, cc: fix buffer overflows in built-in preprocessor (macbody)
add a buffer size argument to macexpand() and check for
overflow.

check for overflow when parsing #include directives.
2020-04-19 23:37:05 +02:00
cinap_lenrek e24bfa4941 ?a: catch symb[NSYMB] buffer overflow in lexer, cleanup, assume thechar is a rune 2020-04-19 22:59:21 +02:00
cinap_lenrek 1b8a569417 cc, ?[acl]: fix gethunk() and move common memory allocator code to cc/compat
for gethunk() to work, all allocators have to use it,
including allocations done by libc thru malloc(),
so the fake allocation functions are mandatory for
everyone.

to avoid duplication the code is moved to cc/compat
and prototypes provided in new cc/compat.h header.
2020-04-11 05:03:49 +02:00
Sigrid 2cdf1a3c79 cc, ?a, ?l: change thunk type to uintptr 2020-04-10 20:38:45 +02:00
Aram Hăvărneanu bf0d5c8abb 6a, 6c, 6l: fix copy propagation
Without an explicit signal for a truncation, copy propagation will
sometimes propagate a 32-bit truncation and end up overwriting uses of
the original 64-bit value.

This was independently discovered and fixed in Go. See:
	http://golang.org/issue/1315
	https://codereview.appspot.com/6002043/

Thanks Charles Forsyth for tips and advice.
2014-05-30 12:28:01 +02:00
cinap_lenrek 4f33c88a51 import updated compilers from sources 2012-07-30 19:11:16 +02:00