-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AbortResult
has two ways to represent a call to exit
#1248
Comments
I suspect that there may be subtle differences in behavior among these options. For instance, adding an I think it would be helpful to characterize what each option does before we make a choice about which option to use. |
It looks like |
...unless the assertion is added via crucible/crucible/src/Lang/Crucible/Backend.hs Lines 128 to 129 in 8021814
Both
Yeah, I find this a bit confusing. Here are some places the treatment/description of these two options differs: crucible/crucible/src/Lang/Crucible/Simulator/Operations.hs Lines 678 to 680 in 8021814
crucible/crucible/src/Lang/Crucible/Simulator/OverrideSim.hs Lines 156 to 160 in 8021814
crucible/crucible/src/Lang/Crucible/Simulator/Operations.hs Lines 122 to 130 in 8021814
It appears that:
It's worth noting that |
Compare:
crucible/crucible/src/Lang/Crucible/Simulator/ExecutionTree.hs
Lines 232 to 233 in 8021814
to
crucible/crucible/src/Lang/Crucible/Simulator/ExecutionTree.hs
Lines 226 to 228 in 8021814
with
crucible/crucible/src/Lang/Crucible/Backend.hs
Lines 135 to 137 in 8021814
We should decide on a single, unambiguous way to represent calls to
exit
orabort
.In fact, we may want to consider a more general mechanism. There are many (often language-specific) ways for a process/thread/unit of execution to abort/exit/end. For example, LLVM has
llvm.trap
:crucible/crucible-llvm/src/Lang/Crucible/LLVM/Intrinsics/LLVM.hs
Line 455 in 8021814
The pattern at the moment is to use
AbortExecReason.AssertionFailure
for these more language-specific conditions.So, we are left with a few options:
AssertionFailure
to represent all early exit statesAbortExecReason
overext
(the language extension) and provide a type family overext
that resolves to an enumeration of the language-specific early exit reasonsIf we pick (1), we would want to decide between:
a. Specifying that this constructor only represents calls to the
exit
system call, and so must provide anExitCode
b. Generalize the constructor to all kinds of early exits, but provide more flexible data alongside it, such as a
String
orDynamic
I'm partial to (3), but it might not be feasible.
The text was updated successfully, but these errors were encountered: