Skip to content

Some developer documentation for memory bounds checking #5228

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
Feb 9, 2020

Conversation

danpoe
Copy link
Contributor

@danpoe danpoe commented Feb 6, 2020

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • n/a Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@majakusber
Copy link

Codecov Report

Merging #5228 into develop will decrease coverage by 1.55%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5228      +/-   ##
===========================================
- Coverage    67.43%   65.88%   -1.56%     
===========================================
  Files         1157     1157              
  Lines        95354    95354              
===========================================
- Hits         64306    62828    -1478     
- Misses       31048    32526    +1478     
Flag Coverage Δ
#cproversmt2 ?
#regression 63.96% <ø> (ø) ⬆️
#unit 31.95% <ø> (ø) ⬆️
Impacted Files Coverage Δ
src/solvers/smt2/letify.cpp 0.00% <0.00%> (-100.00%) ⬇️
src/solvers/smt2/smt2_dec.h 0.00% <0.00%> (-100.00%) ⬇️
src/solvers/floatbv/float_bv.h 0.00% <0.00%> (-100.00%) ⬇️
src/solvers/smt2/smt2irep.cpp 0.00% <0.00%> (-88.00%) ⬇️
src/solvers/floatbv/float_bv.cpp 0.00% <0.00%> (-74.37%) ⬇️
src/solvers/smt2/smt2_dec.cpp 0.00% <0.00%> (-67.70%) ⬇️
src/solvers/smt2/letify.h 33.33% <0.00%> (-66.67%) ⬇️
src/solvers/smt2/smt2_conv.h 36.36% <0.00%> (-63.64%) ⬇️
src/solvers/smt2/smt2_conv.cpp 19.81% <0.00%> (-37.43%) ⬇️
src/solvers/flattening/pointer_logic.cpp 71.21% <0.00%> (-18.19%) ⬇️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cccdfd9...31e9f50. Read the comment docs.

cbmc provides means to verify that pointers are within the bounds of (statically
or dynamically) allocated memory blocks. When the option `--pointer-check` is
used, cbmc checks the safety of each pointer dereference in the program.
Similary, the primitive `__CPROVER_r_ok(pointer, size)` returns true when it is
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Similary, the primitive `__CPROVER_r_ok(pointer, size)` returns true when it is
Similarly, the primitive `__CPROVER_r_ok(pointer, size)` returns true when it is

@codecov-io
Copy link

codecov-io commented Feb 6, 2020

Codecov Report

Merging #5228 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #5228   +/-   ##
========================================
  Coverage    67.43%   67.43%           
========================================
  Files         1157     1157           
  Lines        95352    95352           
========================================
  Hits         64302    64302           
  Misses       31050    31050
Flag Coverage Δ
#cproversmt2 42.67% <ø> (ø) ⬆️
#regression 63.96% <ø> (ø) ⬆️
#unit 31.95% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 778fb97...18c0550. Read the comment docs.

```

Both internal variables `__CPROVER_malloc_object` and `__CPROVER_malloc_size`
are initialised to 0 in the `__CPROVER_initialize()` function of a goto program.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think at some point it was decided that we stick to the Oxford spelling in documentation, i.e. "are initialized ..".

@majakusber
Copy link

Oh no, my face on the codecov again 🤷‍♀️ If it happens third time, I'll look into it. I promise I'm not monitoring your work @xbauch 😅

@xbauch
Copy link
Contributor

xbauch commented Feb 7, 2020

Oh no, my face on the codecov again If it happens third time, I'll look into it. I promise I'm not monitoring your work @xbauch

Not my work in this case; it seems you're somehow responsible for the coverage of cprover documentation.

@majakusber
Copy link

The second codecov report is correctly by codecov-io, and that one actually seems correct - documentation should show no change to coverage I guess. So I'm hoping someone/something fixed it (just as mysteriously as it started using my face) 🤞

@danpoe danpoe force-pushed the doc/memory-bounds-checking branch from 31e9f50 to 259691c Compare February 7, 2020 11:04
Copy link
Contributor

@xbauch xbauch left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Collaborator

@martin-cs martin-cs left a comment

Choose a reason for hiding this comment

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

Don't suppose you want to document how memory leaks and use-after-free are handled do you? :-)

@danpoe danpoe force-pushed the doc/memory-bounds-checking branch from 259691c to 18c0550 Compare February 9, 2020 13:25
@danpoe danpoe merged commit 6680696 into diffblue:develop Feb 9, 2020
@danpoe danpoe deleted the doc/memory-bounds-checking branch June 2, 2020 17:06
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.

6 participants