Skip to content

Fix concurrent traces generated via --trace #697

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

Merged
merged 1 commit into from
Apr 3, 2017

Conversation

tautschnig
Copy link
Collaborator

Traces had been cut off at the failing assertion without considering steps
performed in threads with a higher thread id. The behaviour of --stop-on-fail
was correct in this regard. The trace trimming must only be performed after
re-ordering of steps according to their time stamps.

@@ -286,6 +294,19 @@ void build_goto_trace(
for(auto &t_it : time_map)
goto_trace.steps.splice(goto_trace.steps.end(), t_it.second);

// cut off the trace at the desired end or after the first failed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In test generation, wouldn't we cut off traces that cover several test goals at the first goal that is reached? We would like to see the full trace to the end of the SSA.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's going to cut them off at the specified end, which will be set individually for each goal.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that we need observe the output behaviour beyond the goal.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current code (before this PR) doesn't actually do this, does it?!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current code I can call the first variant of build_goto_trace() that does not truncate.

@tautschnig tautschnig force-pushed the concurrency-trace branch 2 times, most recently from b54d79b to fd1987f Compare March 29, 2017 17:10
@tautschnig
Copy link
Collaborator Author

I have now restored the previous behaviour, my apologies for missing that aspect.

Traces had been cut off at the failing assertion without considering steps
performed in threads with a higher thread id. The behaviour of --stop-on-fail
was correct in this regard. The trace trimming must only be performed after
re-ordering of steps according to their time stamps.
@kroening kroening merged commit 5679e90 into diffblue:master Apr 3, 2017
@tautschnig tautschnig deleted the concurrency-trace branch April 4, 2017 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants