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

Fix tracer #1348

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix tracer #1348

wants to merge 2 commits into from

Conversation

pbst
Copy link

@pbst pbst commented Dec 16, 2018

edit: still WIP as this does not yet pass all CI tests

This PR fixes shellphish/driller#68.

Also, while debugging I noticed that the current state address in the debug output makes looking up the places inside the binary a lot easier. So I added that as well.

I also created this minimized testcase that previously triggered the issue.

// build with:                                                                                                                                                                                   
// gcc -m32 -nostdlib -static tiny.s -o tiny                                                                                                                                                     
                                                                                                                                                                                                 
foo:                                                                                                                                                                                             
        pushfl                                                                                                                                                                                   
        popfl                                                                                                                                                                                    
        ret                                                                                                                                                                                      
                                                                                                                                                                                                 
        .global _start                                                                                                                                                                           
_start:                                                                                                                                                                                          
        // call so we get more than 1 basic block                                                                                                                                                
        call foo                                                                                                                                                                                 
                                                                                                                                                                                                 
        // set exit status so we get feedback                                                                                                                                                    
        movl    $8, %ebx                                                                                                                                                                         
        movl    $1, %eax                                                                                                                                                                         
        int     $0x80 

@pbst
Copy link
Author

pbst commented Dec 17, 2018

The CI log contains:

ERROR: Failure: ImportError (No module named 'avatar2')

To my understanding, this does not look like it was caused by my patches. Can someone please look into this?

@rhelmot
Copy link
Member

rhelmot commented Dec 18, 2018

ignore appveyor. it's just gonna do whatever it's gonna do.

I would prefer if this change could be made in a way that doesn't mutate the trace. I'm in the process of trying to formalize the tracing procedure and it would be really nice if every notion of a divergence could be represented by a set of rules for identifying the divergence and updating the state's metadata on a given step. If you think that's too hard I'll merge this as is if you add a test. (no test required if you just make it look like all the rest of the special cases)

pbst added a commit to pbst/driller that referenced this pull request Dec 19, 2018
@rhelmot rhelmot force-pushed the master branch 2 times, most recently from 0d7d255 to 0f4235a Compare June 4, 2020 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

basic block tracing broken
2 participants