SAW error messages obscure names of LLVM functions that lack implementations #2198
Labels
needs test
Issues for which we should add a regression test
subsystem: crucible-llvm
Issues related to LLVM bitcode verification with crucible-llvm
topics: error-messages
Issues involving the messages SAW produces on error
topics: memory model
Issues that relate to the LLVM and/or Crucible model of pointers and memory blocks
type: bug
Issues reporting bugs or unexpected/unwanted behavior
usability
An issue that impedes efficient understanding and use
Milestone
Sometimes, LLVM functions are
declare
d without function bodies, which means that Crucible will abort if it tries to simulate them. When using a tool like Crux-LLVM to drive Crucible, the resulting error message pinpoints thedeclare
d function that is responsible, but SAW's equivalent of the same error message does not.To better illustrate what I mean, consider the following C program and corresponding SAW spec:
This program declares
foo
as anextern
function without defining it, so naturally, Crucible won't know what to do with it at the LLVM level either:If we run the
main
function through Crux-LLVM, here is the error message that we get:Note the
Via pointer: Global symbol "foo" (1, 0x0:[64])
part, which clues us in to the function that is responsible for the error. If you try to simulatemain
using SAW, however, this is the error that you get:This time, the error message is much more vague. It hints about
No implementation or override found for pointer
, but which one? The only mention offoo
at all is in the LLVM memory at the bottom, but the connection between this function and the error message above is not at all obvious from a quick glance. (The connection is even less obvious if there are many external functions involved in the program, as is likely to be the case in larger programs.)What is especially unfortunate here is that I think both Crux-LLVM and SAW are recorded the same type of Crucible error under the hood, but Crux-LLVM is choosing to display more information about the error than SAW is. As such, I think this is mostly a matter of error reporting rather than Crux-LLVM being more clever than SAW.
The text was updated successfully, but these errors were encountered: