From 1c2dfa1f4bb162678c293788678f6790514cb7ba Mon Sep 17 00:00:00 2001 From: Edmund Grimley Evans Date: Sat, 21 Nov 2015 11:23:53 +0000 Subject: Change the way struct CStrings are handled. A CString used to be copied into a token string, which is an int array. On a 64-bit architecture the pointers were misaligned, so ASan gave lots of warnings. On a 64-bit architecture that required memory accesses to be correctly aligned it would not work at all. The CString is now included in CValue instead. --- tcc.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index c284880..3b98a8c 100644 --- a/tcc.h +++ b/tcc.h @@ -400,7 +400,11 @@ typedef union CValue { double d; float f; uint64_t i; - struct CString *cstr; + struct { + int size; + const void *data; + void *data_allocated; + } str; int tab[LDOUBLE_SIZE/4]; } CValue; -- cgit v1.3.1