-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Labels
needs designTechnical design work is needed for issue to progressTechnical design work is needed for issue to progressneeds testIssues for which we should add a regression testIssues for which we should add a regression testsubsystem: crucible-llvmIssues related to LLVM bitcode verification with crucible-llvmIssues related to LLVM bitcode verification with crucible-llvmsubsystem: crucible-mirIssues related to Rust verification with crucible-mir and/or mir-jsonIssues related to Rust verification with crucible-mir and/or mir-jsontech debtIssues that document or involve technical debtIssues that document or involve technical debttopics: memory modelIssues that relate to the LLVM and/or Crucible model of pointers and memory blocksIssues that relate to the LLVM and/or Crucible model of pointers and memory blockstype: bugIssues reporting bugs or unexpected/unwanted behaviorIssues reporting bugs or unexpected/unwanted behaviorunsoundnessIssues that can lead to unsoundness or false verificationIssues that can lead to unsoundness or false verification
Milestone
Description
Constants need to be able to assume that globals are allocated.
I believe that we either need to stop assuming that constants can always be allocated or start assuming that globals are always allocated.
This statement is filtering out non-constant globals just before it tries to initialize all constants.
saw-script/saw-central/src/SAWCentral/Crucible/LLVM/Builtins.hs
Lines 1762 to 1763 in f648b72
mem <- Crucible.populateConstGlobals bak (view Crucible.globalInitMap mtrans) | |
=<< Crucible.initializeMemoryConstGlobals bak ctx llvm_mod |
Here's an example.
example.c
char gstuff[] = "stuff";
char* const p = &gstuff[2];
void noop() {}
clang -c example.c -emit-llvm
example.saw
m <- llvm_load_module "example.bc";
llvm_verify m "noop" [] false (llvm_execute_func []) rme;
AssertionFailure :1:0: error: in _start
Global symbol not allocated
Details:
Global symbol "gstuff" has no associated allocation
Metadata
Metadata
Assignees
Labels
needs designTechnical design work is needed for issue to progressTechnical design work is needed for issue to progressneeds testIssues for which we should add a regression testIssues for which we should add a regression testsubsystem: crucible-llvmIssues related to LLVM bitcode verification with crucible-llvmIssues related to LLVM bitcode verification with crucible-llvmsubsystem: crucible-mirIssues related to Rust verification with crucible-mir and/or mir-jsonIssues related to Rust verification with crucible-mir and/or mir-jsontech debtIssues that document or involve technical debtIssues that document or involve technical debttopics: memory modelIssues that relate to the LLVM and/or Crucible model of pointers and memory blocksIssues that relate to the LLVM and/or Crucible model of pointers and memory blockstype: bugIssues reporting bugs or unexpected/unwanted behaviorIssues reporting bugs or unexpected/unwanted behaviorunsoundnessIssues that can lead to unsoundness or false verificationIssues that can lead to unsoundness or false verification