Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • F frama-c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 209
    • Issues 209
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • pub
  • frama-c
  • Issues
  • #425

Closed
Open
Created Jun 21, 2016 by mantis-gitlab-migration@mantis-gitlab-migration

Creating a pointer to a local causes valid pointers above it to lose thier valid status

ID0002234: This issue was created automatically from Mantis Issue 2234. Further discussion may take place here.


Id Project Category View Due Date Updated
ID0002234 Frama-C Plug-in > wp public 2016-06-21 2016-06-21
Reporter jrobbins Assigned To correnson Resolution open
Priority normal Severity major Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C Aluminium Target Version - Fixed in Version -

Description :

Pointers that are \valid lose their status as \valid if there is code below it that assigns to a pointer. This only seems to happen when the pointer in question is wrapped in a struct.

Additional Information :

Tested on Aluminum on a Linux machine.

Steps To Reproduce :

== file bug.c:

struct s { int* ptr; };

/@ requires \valid(t.ptr); @/ void foo(struct s t) { //@ assert \valid(t.ptr); int a; int* x = &a; }

== Run command:

frama-c bug.c -wp

== Output:

[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing) [kernel] Parsing bug.c (with preprocessing) [wp] warning: Missing RTE guards [wp] 1 goal scheduled [wp] [Alt-Ergo] Goal typed_foo_assert : Unknown (51ms) [wp] Proved goals: 0 / 1 Alt-Ergo: 0 (unknown: 1)

== File fixed.c:

struct s { int* ptr; };

/@ requires \valid(t.ptr); @/ void foo(struct s t) { //@ assert \valid(t.ptr); int a; int* x; // = &a; }

== Run command:

frama-c bug.c -wp

== Output:

[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing) [kernel] Parsing bug.c (with preprocessing) [wp] warning: Missing RTE guards [wp] 1 goal scheduled [wp] Proved goals: 1 / 1 Qed: 1

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking