You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The EncodeM and DecodeM instances for debug metadata are currently quite fragile, and there are several places where a segmentation fault could be triggered by debug metadata structures which we don't handle, or don't handle correctly.
In particular, there are multiple places where we use maybe (return nullPtr) encodeM to pass a null pointer to the LLVM C/C++ API where we have Nothing on the Haskell side. An audit of the encoding needs to be carried out to make sure that we only pass null pointers to LLVM where the LLVM API explicitly accepts a null pointer as an indicator of the absence of something, and not anywhere else. We currently have at least one null pointer being passed to an LLVM API function which dereferences it, leading to the segmentation fault when attempting to load the IR produced by clang -g.
The text was updated successfully, but these errors were encountered:
The
EncodeM
andDecodeM
instances for debug metadata are currently quite fragile, and there are several places where a segmentation fault could be triggered by debug metadata structures which we don't handle, or don't handle correctly.In particular, there are multiple places where we use
maybe (return nullPtr) encodeM
to pass a null pointer to the LLVM C/C++ API where we haveNothing
on the Haskell side. An audit of the encoding needs to be carried out to make sure that we only pass null pointers to LLVM where the LLVM API explicitly accepts a null pointer as an indicator of the absence of something, and not anywhere else. We currently have at least one null pointer being passed to an LLVM API function which dereferences it, leading to the segmentation fault when attempting to load the IR produced byclang -g
.The text was updated successfully, but these errors were encountered: