search for: objsizemax

Displaying 3 results from an estimated 3 matches for "objsizemax".

2017 Jan 02
2
RFC: Allowing @llvm.objectsize to be more conservative with null.
...unknown> bit needs to be set) or in the middle end. What is your plan here? I also found gcc's choice of folding builtin_object_size(0, 2) to 0 and builtin_object_size(0, 0) to -1 somewhat odd; I'd have expected the inverse. This follows from the following "intuitive" rules ObjSizeMax(X) = UMAX(ObjSizeMax(A), ObjSizeMax(B)) ObjSizeMin(X) = UMIN(ObjSizeMin(A), ObjSizeMin(B)) (where X is a value that can either be A or B at runtime) and that we want to fold ObjSizeMax(Malloc(N)) = ObjSizeMin(Malloc(N)) = N However, since Malloc can return null: ObjSizeMax(Malloc(N)) = UMAX(N,...
2017 Jan 02
2
RFC: Allowing @llvm.objectsize to be more conservative with null.
...>> is your plan here? >> >> I also found gcc's choice of folding builtin_object_size(0, 2) to 0 and >> builtin_object_size(0, 0) to -1 somewhat odd; I'd have expected the >> inverse. This follows from the following "intuitive" rules >> >> ObjSizeMax(X) = UMAX(ObjSizeMax(A), ObjSizeMax(B)) >> ObjSizeMin(X) = UMIN(ObjSizeMin(A), ObjSizeMin(B)) >> >> (where X is a value that can either be A or B at runtime) >> >> and that we want to fold >> >> ObjSizeMax(Malloc(N)) = ObjSizeMin(Malloc(N)) = N >> &gt...
2016 Dec 21
2
RFC: Allowing @llvm.objectsize to be more conservative with null.
tl;dr: We'd like to add a bit to @llvm.objectsize to make it optionally be conservative when it's handed a null pointer. Happy Wednesday! We're trying to fix PR23277, which is a bug about how clang+LLVM treat __builtin_object_size when it's given a null pointer. For compatibility with GCC, clang would like to be able to hand back a conservative result (e.g. (size_t)-1), but the