From b4b117463fbd4303e7adca8af20ce6764b0aa7d9 Mon Sep 17 00:00:00 2001 From: stegerg Date: Mon, 26 Feb 2007 16:04:05 +0000 Subject: [PATCH] Replaced code line which subtracted AROS_ALIGN(sizeof(ULONG)) from memoryBlock. Old code because of this strict aliasing crap generated code which first read memoryBlock into a register, did the subtraction on the variable in memory (not register) and then passed the register (unmodified == as before subtraction) to FreeMem(). git-svn-id: https://svn.aros.org:8080/svn/aros/trunk/AROS@25294 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- rom/exec/freevec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rom/exec/freevec.c b/rom/exec/freevec.c index 296821471..3ed8b662a 100644 --- a/rom/exec/freevec.c +++ b/rom/exec/freevec.c @@ -49,7 +49,7 @@ /* If there's nothing to free do nothing. */ if (memoryBlock != NULL) { - *(UBYTE **)&memoryBlock -= AROS_ALIGN(sizeof(ULONG)); + memoryBlock -= AROS_ALIGN(sizeof(ULONG)); FreeMem (memoryBlock, *((ULONG *)memoryBlock)); } AROS_LIBFUNC_EXIT -- 2.11.4.GIT