Skip to content
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

Add a SAWscript position to calls to Crucible's malloc #479

Merged

Conversation

langston-barrett
Copy link
Contributor

@langston-barrett langston-barrett commented Jun 4, 2019

So when users get a Crucible memory dump, they can tell that this allocation was made in a SAW override, rather than in their C/LLVM code.

It would also be good to do this in doAlloc and doAllocConst.

Example (right below Found 1 possibly matching allocation(s)):

Abort due to false assumption:
  All overrides failed during structural matching:
  *  Name: EVP_DigestInit_ex
     Location: /build/fizz-hkdf/digest.saw:198:3
     Argument types: 
     - %struct.env_md_ctx_st*
     - %struct.env_md_st*
     - %struct.engine_st*
     Return type: i32
     at /build/fizz-hkdf/digest.saw:104:3
     error when loading through pointer that appeared in the override's points-to precondition(s):
     Precondition:
       Pointer: concrete pointer: allocation = 645, offset = 72
       Pointee: literal integer: unsigned value = 0, signed value =  0, width = 64
       Assertion made at: /build/fizz-hkdf/digest.saw:104:3
     Failure reason: 
       When reading through pointer (645, 0x48:[64])
       Tried to read something of size: 8
       And type: i64
       Found 1 possibly matching allocation(s):
       - HeapAlloc 645 0x120:[64] Mutable /build/fizz-hkdf/hmac.saw:143:14

So when users get a Crucible memory dump, they can tell that this allocation
was made in a SAW override, rather than in their C/LLVM code
@langston-barrett langston-barrett added the topics: error-messages Issues involving the messages SAW produces on error label Jun 5, 2019
@langston-barrett langston-barrett merged commit 4df70ac into GaloisInc:master Jun 5, 2019
@langston-barrett langston-barrett deleted the executeallocation-src-pos branch June 5, 2019 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topics: error-messages Issues involving the messages SAW produces on error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant