2014-10-28 53 views
1

在程序上運行KLEE時遇到錯誤「KLEE:ERROR:unknown intrinsic:llvm.objectsize.i64.p0i8」。KLEE:錯誤:unknown內部:llvm.objectsize.i64.p0i8

我知道我應該在IntrinsicCleaner過程中添加對它的支持。但是我沒有找到這個內在函數的文檔。有人知道這個內在功能的目的嗎?

下面是LLCM代碼涉及的功能行:
%6 = call i64 @llvm.objectsize.i64.p0i8(i8* %5, i1 false)

回答

1

這是正確的LLVM documentation

declare i64 @llvm.objectsize.i64(i8* <object>, i1 <min>) 

The llvm.objectsize intrinsic is designed to provide information to the optimizers to determine at compile time whether a) an operation (like memcpy) will overflow a buffer that corresponds to an object, or b) that a runtime check for overflow isn’t necessary. An object in this context means an allocation of a specific class, structure, array, or other object.

+0

什麼是 'p0i8' 是什麼意思? – 2014-10-29 18:26:28

+0

指向8位整數的指針(即char) – 2014-10-29 18:29:38