Open ainar-g opened 8 years ago
Thank you for your report. We'll definitely keep track of these issues, but we don't have the ability to work on these at the moment. If you can patch 'stoke extract' for the first one so that will Go programs will behave more nicely, we're all for it. If you can provide steps to reproduce the second issue that will make it more likely that we (or someone else) can debug it at some point.
Depending on how committed you are, there are other ways to build testcases. It's easy to get the validator to do this via symbolic execution, and we also have a generator for random testcases that works well if you're doing only simple things (it's not so good with data structures). It's also possible to build them by hand.
Sorry for the delay. Here is a gist that reproduces the second issue:
https://gist.github.com/ainar-g/c43446f60b3dded12e62
Go installation instructions can be found on golang.org. As for the first issue, I could look into that, but it doesn't bother me that much.
I'm having another problem trying with Go 1.7 binaries:
stoke extract
fails on the vast majority of functions with error messages of the form:
Could not encode 'movq %fs:0xfffffffffffffff8,%rcx' within 9 bytes
Does Go have a stack protector feature? That could cause this to be generated. If so, turning it off might be a workaround. I don't understand enough about how segment registers work in 64bit mode to suggest a real solution at the moment.
On Nov 26, 2016 23:39, "Peter Waller" notifications@github.com wrote:
I'm having another problem trying with Go 1.7 binaries:
stoke extract fails on the vast majority of functions with error messages of the form:
Could not encode 'movq %fs:0xfffffffffffffff8,%rcx' within 9 bytes
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/StanfordPL/stoke/issues/847#issuecomment-263090229, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnG6bzxC-NO8GE-vjuyECaXYI8aEZ6xks5rCLUcgaJpZM4HevoR .
Stacks are implemented quite differently in Go compared to C, since Go will (for go-routines at least) switch stacks from under a routine if it needs more space.
This is the continuation of issue #27 from the original repo. Issues I've encountered this time, with stoke version
6a0f6e9b
:Issues with files in
bins
that have spaces in names. In my case (this program compiled with Go 1.5.1)stoke extract
generates among others these files:stoke testcase
will then fail withAfter removing those, I am able to proceed.
The "deadlock" I've mentioned in the original issue is still there. Putting
println("start")
andprintln("finish")
in the program's main shows thatstoke testcase
runs it, but after that it gets stuck and seemingly does nothing.popcnt.tc
is created, but it's empty.strace
shows that it reads all files inbins
and then waits for something: