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 208
    • Issues 208
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • 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
  • #183

Closed
Open
Created Dec 05, 2018 by mantis-gitlab-migration@mantis-gitlab-migration

missing E-ACSL code when ignoring asm annotation

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


Id Project Category View Due Date Updated
ID0002413 Frama-C Plug-in > E-ACSL public 2018-12-05 2018-12-06
Reporter rmalak Assigned To signoles Resolution open
Priority normal Severity major Reproducibility always
Platform x86_64 OS Linux 4.18 OCaml 4.07.0 OS Version Debian Sid
Product Version Frama-C 18-Argon Target Version - Fixed in Version -

Description :

Hi,

//////////////// asm.c void func() { int i = 0; int ptr=&i; /@ assert \valid(ptr); */ *ptr = 0; } int main(int argc, char **argv) { func(); asm (""); return 0; } ////////////////

Additional Information :

When one comments the asm line and compare the generated code, it seems that the list of missing functions are :

__e_acsl_memory_clean __e_acsl_store_block __e_acsl_delete_block __e_acsl_initialize __e_acsl_full_init

The problem is similar on Chlorine and Argon.

i and ptr could also be global static variables, it doesn't change anything

Steps To Reproduce :

$ frama-c -machdep gcc_x86_64 asm.c -e-acsl -then-last -print -ocode eacsl_asm.c [kernel] Parsing FRAMAC_SHARE/e-acsl/e_acsl_gmp_api.h (with preprocessing) [kernel] Parsing FRAMAC_SHARE/e-acsl/e_acsl.h (with preprocessing) [kernel] Parsing asm.c (with preprocessing) [e-acsl] beginning translation. [e-acsl] asm.c:11: Warning: E-ACSL construct `asm' is not yet supported. Ignoring annotation. [e-acsl] translation done in project "e-acsl".

$ gcc -DE_ACSL_SEGMENT_MMODEL -Wno-attributes -I$(frama-c -print-share-path)/e-acsl/ -o asm eacsl_asm.c $(frama-c -print-share-path)/e-acsl/e_acsl_rtl.c $(frama-c -print-share-path)/../../lib/libeacsl-dlmalloc.a $(frama-c -print-share-path)/../../lib/libeacsl-gmp.a -lm

$ ./asm Assertion failed at line 5 in function func. The failing predicate is: \valid(ptr). Aborted

Attachments

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