Skip to content

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

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