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
  • #2041
Closed
Open
Issue created May 20, 2011 by mantis-gitlab-migration@mantis-gitlab-migration

Successive calls of Cil.emptyfunction generate a Failure("trying to redefine an existing kernel function")

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


Id Project Category View Due Date Updated
ID0000831 Frama-C Kernel public 2011-05-20 2012-06-10
Reporter ploc Assigned To virgile Resolution no change required
Priority normal Severity major Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C Boron-20100401 Target Version - Fixed in Version Frama-C Nitrogen-20111001

Description :

Cil.emptyFunction relies on makeGlobalVar, that calls makeVarinfo to build a new varinfo. This varinfo has vid = -1, but the function set_vid from Cil_const is called that provides a fresh vid to it, using the Build_Counter (register with Computation.Ref).

The issue is the following: working in a project, I introduce a new function when applying a cil copy visitor. Then on the new project I introduce another new function. The problem is that the two successive calls to Cil.emptyfunction will provide the same vid.

The project created through the cil copy visitor will not keep the Computation.Ref Build_Counter. So the successive introductions of new function will be associated to the same vid.

Is there a way do solve this ? How to copy the Build_Counter information in the new project ? Or is there nicer way to handle this ?

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