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 (Tim Newsham)
  • Date: Mon, 17 Aug 2015 19:44:22 -1000

    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

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 | | @newshtwit |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 254 bytes
Desc: not available
URL: <>