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 168
    • Issues 168
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • 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
  • #196

Wrong specification for standard library function memmove

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


Id Project Category View Due Date Updated
ID0001648 Frama-C Kernel public 2014-02-17 2018-11-30
Reporter pascal Assigned To maroneze Resolution open
Priority normal Severity major Reproducibility always
Platform - OS - OS Version -
Product Version - Target Version - Fixed in Version -

Description :

CONTEXT: This issue does not originate from an industrial application. It is reported for the lulz.

DESCRIPTION: The post-condition for memmove() incorrectly describes its effects when source and destination overlap.

/@ ... @ ensures memcmp((char)dest,(char*)src,n) == 0; ... @*/ extern void *memmove(void *dest, const void *src, size_t n);

In order to be maximally useful, the memcmp logic function, which is defined thus:

/*@ axiomatic MemCmp { @ logic ℤ memcmp{L}(char *s1, char *s2, ℤ n) @ reads s1[0..n - 1], s2[0..n - 1]; ...

would need to be parameterized by two labels L1 and L2, and state that the memory zone pointed by s1 in L1 is identical to the memory zone pointed by s2 in L2.

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