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
  • #973

User defined function with specification memset conflicts with __e_acsl_memset in e_acsl_mmodel.c

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


Id Project Category View Due Date Updated
ID0001838 Frama-C Plug-in > E-ACSL public 2014-07-16 2014-09-15
Reporter arvidj Assigned To guillaume-petiot Resolution fixed
Priority normal Severity minor Reproducibility have not tried
Platform - OS - OS Version -
Product Version - Target Version Frama-C Neon-20140301 Fixed in Version -

Description :

If the user defines a function "memset" with specifications, then the generated function will be called __e_acsl_memset. But there is already such a function in e_acsl_mmodel.c, so there is an error on linking. Example:

/*@ requires \valid(p) ; */ int memset(char *p) { return 123; }

int main() { char *s = "toto"; memset(s); return 0; }

When compiling and linking:

/tmp/ccRT0UnW.o: In function __e_acsl_memset': scratch.gen.c:(.text+0x14): multiple definition of __e_acsl_memset' /tmp/cc8qdTOL.o:e_acsl_mmodel.c:(.text+0x2b): first defined here collect2: error: ld returned 1 exit status

Attachments

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