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] Set global variables uninitialized at Value analysis start
- Subject: [Frama-c-discuss] Set global variables uninitialized at Value analysis start
- From: dmentre at linux-france.org (David MENTRE)
- Date: Tue, 28 May 2013 08:52:25 +0200
- In-reply-to: <CAOH62JgkheZqrWDsxwA8Ah3iQCFh8DEdXwviSTXW0JZOAZk9yA@mail.gmail.com>
- References: <CAC3Lx=Zzm7DFwU_XEtn+u_p=18kgn-qFRQMp5VOpBqRs8PDZAw@mail.gmail.com> <E50756B2-BF80-4A38-AE62-AD3F4A70A264@cea.fr> <CAC3Lx=ZT5n1iZ-oJZHGr2emVsNRd2HgoSaC+Tghn69Cj=UR0eA@mail.gmail.com> <CAC3Lx=brLLEht0LqH7TMdTvexPKExjpS+btJcWc60mCup_rtFA@mail.gmail.com> <CAOH62JgkheZqrWDsxwA8Ah3iQCFh8DEdXwviSTXW0JZOAZk9yA@mail.gmail.com>
Hello Pascal, 2013/5/27 Pascal Cuoq <pascal.cuoq at gmail.com>: > If it is only ?some? global variables that need to uninitialized, > then you could mark them as such in your own main() before > launching the real main(): > > ~ $ cat un.c > int a, b, c; > > int main(int argc, char **argv){ > Frama_C_dump_each(); > } > > int uninitialize_and_main(int argc, char **argv){ > // mark variable(s) as uninitialized > char uninitialized[640] ; // ought to be enough for anyone > #define UNINIT(t, v) v = * (t *) uninitialized; > UNINIT(int, c); > return main(argc, argv); > } > ~ $ frama-c -val un.c -main uninitialize_and_main Thanks a lot for the trick! This is exactly what I wanted. Doing such kind of modification on my real program, I could catch an uninitialized value! \o/ I have a bunch of globals (about 150) but I should be able to manage that with some sed scripting. Best regards, david
- References:
- [Frama-c-discuss] Set global variables uninitialized at Value analysis start
- From: dmentre at linux-france.org (David MENTRE)
- [Frama-c-discuss] Set global variables uninitialized at Value analysis start
- From: Benjamin.MONATE at cea.fr (MONATE Benjamin 205998)
- [Frama-c-discuss] Set global variables uninitialized at Value analysis start
- From: dmentre at linux-france.org (David MENTRE)
- [Frama-c-discuss] Set global variables uninitialized at Value analysis start
- From: dmentre at linux-france.org (David MENTRE)
- [Frama-c-discuss] Set global variables uninitialized at Value analysis start
- From: pascal.cuoq at gmail.com (Pascal Cuoq)
- [Frama-c-discuss] Set global variables uninitialized at Value analysis start
- Prev by Date: [Frama-c-discuss] Set global variables uninitialized at Value analysis start
- Next by Date: [Frama-c-discuss] Fix for inductive predicate
- Previous by thread: [Frama-c-discuss] Set global variables uninitialized at Value analysis start
- Next by thread: [Frama-c-discuss] Set global variables uninitialized at Value analysis start
- Index(es):