Logging just enough information for failed pre-conditions
ID0001415: This issue was created automatically from Mantis Issue 1415. Further discussion may take place here.
|ID0001415||Frama-C||Plug-in > Eva||public||2013-05-03||2014-03-13|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Product Version||-||Target Version||-||Fixed in Version||Frama-C Neon-20140301|
There was a bit of a discussion over an analysis made on an example provided by a StackOverflow user:
The current message is:
.../libc/string.h:54:[value] Function memcpy: precondition got status invalid.
That is a bit frustrating. The localization of the call to memcpy() can be found just above in the log:
[value] computing for function memcpy <- main. Called from mem.c:13.
but the exact nature of the detected issue is only printed as a reference to libc/string.h, a file that the user did not even provide emself.
There are at least two solutions suggested by the discussion:
annotate the libc preconditions with nice labels, and when a pre-condition fails, print any label it may have, or
print the entire ACSL pre-condition that failed, including any label it may have.