Hi,<br><br>The lli interpreter  crashed for the following case:<br><br>; ModuleID = 'x.c'<br>target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
<br>target triple = "i686-pc-linux-gnu"<br><br>define i32 @main() {<br>entry:<br>    %retval = alloca i32        ; <i32*> [#uses=2]<br>    %tmp = alloca i32       ; <i32*> [#uses=2]<br>    %x = alloca i75, align 16       ; <i75*> [#uses=1]
<br>    %"alloca point" = bitcast i32 0 to i32      ; <i32> [#uses=0]<br>    store i75 999, i75* %x, align 16<br>    store i32 0, i32* %tmp, align 4<br>    %tmp1 = load i32* %tmp, align 4     ; <i32> [#uses=1]
<br>    store i32 %tmp1, i32* %retval, align 4<br>    br label %return<br><br>return:     ; preds = %entry<br>    %retval2 = load i32* %retval        ; <i32> [#uses=1]<br>    ret i32 %retval2<br>}<br><br>The output is :
<br><br>*** glibc detected *** lli: free(): invalid pointer: 0x088cb1d8 ***<br>======= Backtrace: =========<br>/lib/libc.so.6[0x479efd]<br>/lib/libc.so.6(cfree+0x90)[0x47d550]<br>lli(_ZN4llvm12AllocaHolderD1Ev+0x2b)[0x84bcb4d]
<br>lli(_ZN4llvm18AllocaHolderHandleD1Ev+0x37)[0x84bcbab]<br>lli(_ZN4llvm16ExecutionContextD1Ev+0x14)[0x84bd780]<br>lli(_ZN9__gnu_cxx13new_allocatorIN4llvm16ExecutionContextEE7destroyEPS2_+0x11)[0x84bd7af]<br>... ...<br><br>
I checked the llvm svn log, this is due to the patch from " svn diff -r43619:43620"<br>The replacement of getABITypeSize with getTypeSize caused it.<br>This seems an alignment unmatch issue. As for type i75, the getABITypeSize/getABITypeAlignment  will return 10 while in APInt, it actually allocated two-64bit-array (128bit totally) hence the malloc/free crashed.
<br><br>Ciao, can you take a look at it?<br><br>