Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
klee_tutorial
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Edvin Åkerfeldt
klee_tutorial
Commits
ff2aff68
Commit
ff2aff68
authored
Dec 14, 2020
by
Edvin Åkerfeldt
Browse files
Options
Downloads
Patches
Plain Diff
cargo_klee_examples/examples/cyccnt.rs, A & B
parent
564c95bd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cargo_klee_examples/examples/cyccnt.rs
+18
-0
18 additions, 0 deletions
cargo_klee_examples/examples/cyccnt.rs
with
18 additions
and
0 deletions
cargo_klee_examples/examples/cyccnt.rs
+
18
−
0
View file @
ff2aff68
...
@@ -167,6 +167,12 @@ fn main() {
...
@@ -167,6 +167,12 @@ fn main() {
// What do you get, and why?
// What do you get, and why?
//
//
// [your answer here]
// [your answer here]
/*
(gdb) print start
$1 = <optimized out>
Because _time is never used, the value has been optimized away. Same for end
*/
//
//
// As you should have seen, this was not particularly informative, right?
// As you should have seen, this was not particularly informative, right?
//
//
...
@@ -198,14 +204,26 @@ fn main() {
...
@@ -198,14 +204,26 @@ fn main() {
// Value of `start`.
// Value of `start`.
//
//
// [your answer here]
// [your answer here]
/*
(gdb) print start
$1 = 2147483648
*/
//
//
// Value of `end`
// Value of `end`
//
//
// [your answer here]
// [your answer here]
/*
(gdb) print end
$2 = 0
*/
//
//
// Why does these values cause an error debug/dev build but not in a release build?
// Why does these values cause an error debug/dev build but not in a release build?
//
//
// [your answer here]
// [your answer here]
/*
I think its because the subtraction never takes place in the optimized version.
TODO: Make sure this is the case.
*/
//
//
// C) Fix the problem!
// C) Fix the problem!
//
//
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment