Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • 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
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 171
    • Issues 171
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • pub
  • frama-c
  • Issues
  • #1984
Closed
Open
Issue created Nov 10, 2011 by Boris Yakobowski@byakoDeveloper

Crash when casting something to type void

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


Id Project Category View Due Date Updated
ID0001013 Frama-C Kernel public 2011-11-10 2012-09-19
Reporter yakobowski Assigned To yakobowski Resolution fixed
Priority normal Severity crash Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C Nitrogen-20111001 Target Version - Fixed in Version Frama-C Oxygen-20120901

Description :

The value analysis crashes on the following code, analyzed with -val

void* memcpy(void* dst, const void *src, unsigned long n) { for (int i=0;i<n;i++) dst[i]=src[i]; return dst; }

void main () { int x = 1; memcpy(&x,&x,4); }

Casting src[i] to type void causes a crash. We have two possibilities here:

  • add a fatal error during parsing, when something has type void. This is what gcc does, and in my opinion the best solution;
  • change the 'assert false' inside the value analysis into something else, probably a fatal user error.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking