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. --- i386-asm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'i386-asm.c') diff --git a/i386-asm.c b/i386-asm.c index bd0825b..68a7861 100644 --- a/i386-asm.c +++ b/i386-asm.c @@ -330,7 +330,7 @@ static void parse_operand(TCCState *s1, Operand *op) next(); if (tok != TOK_PPNUM) goto reg_error; - p = tokc.cstr->data; + p = tokc.str.data; reg = p[0] - '0'; if ((unsigned)reg >= 8 || p[1] != '\0') goto reg_error; -- cgit v1.3.1