Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] memcpy / memset question


  • Subject: [Frama-c-discuss] memcpy / memset question
  • From: tim.newsham at gmail.com (Tim Newsham)
  • Date: Mon, 17 Aug 2015 19:44:22 -1000

Hi,
    I am analyzing some code that uses memcpy and memset
from <string.h>.  I notice that the frama libc came with implementations
for these that had their own annotations.  However, when doing
value analysis it doesn't seem to be working as I expected.
I'm using the attached test.c and when I analyze it, I get:

test.c:12:[kernel] warning: accessing uninitialized left-value: assert
\initialized(&targ[i]);

which indicates that the analyzer did not notice that memcpy
is initializing all of targ[0..n-1] when doing memcpy(targ, src, n).
Is there an easy way to force this in the analysis?

I see virtually the same thing happening with memset as well.

-- 
Tim Newsham | www.thenewsh.com/~newsham | @newshtwit | thenewsh.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20150817/269cf023/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 254 bytes
Desc: not available
URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20150817/269cf023/attachment-0001.c>