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] Problem with memset
- Subject: [Frama-c-discuss] Problem with memset
- From: Boris.Hollas at de.bosch.com (Hollas Boris (CR/AEY1))
- Date: Thu, 3 Dec 2009 13:49:08 +0100
- In-reply-to: <4B17A203.5040507@inria.fr>
- References: <FC0686BB6178BC43B9DC035287A11A720DBE7688A4@SI-MBX12.de.bosch.com> <4B17A203.5040507@inria.fr>
Hello Pascal, I've used this in a header file to verify memory safety of the caller: typedef unsigned char uint8; typedef unsigned int size_t; /*@ requires (\valid((uint8*)pDest +(0..num-1))) && @ (0 <= value <= 255) && @ (0 < num); @ ensures (\forall int i; 0 <= i < num @ ==> (((uint8*)pDest)[i] == value)) && @ (\result == pDest); @*/ extern void *memset( void *pDest, const int value, const size_t num ); However, Jessie reports Casting from type struct char_P * to type struct unsigned_char_P * not allowed in logic Maybe it's because void-pointers aren't supported, as Claude wrote. Having a contract for memset in a header file as you suggest would be sufficient because we don't want to verify the implementation of memset itself. Regards, Boris
- Follow-Ups:
- [Frama-c-discuss] Problem with memset
- From: Claude.Marche at inria.fr (Claude Marche)
- [Frama-c-discuss] Problem with memset
- References:
- [Frama-c-discuss] Problem with memset
- From: Boris.Hollas at de.bosch.com (Hollas Boris (CR/AEY1))
- [Frama-c-discuss] Problem with memset
- From: Claude.Marche at inria.fr (Claude Marche)
- [Frama-c-discuss] Problem with memset
- Prev by Date: [Frama-c-discuss] usage of Frama_C_memcpy
- Next by Date: [Frama-c-discuss] Lemma from ACSL doc doesn't verify
- Previous by thread: [Frama-c-discuss] Problem with memset
- Next by thread: [Frama-c-discuss] Problem with memset
- Index(es):