Re: Detecting Reads of Global Uninitialized Variables
- From: "Alexei A. Frounze" <alexfru@xxxxxxx>
- Date: Fri, 30 Sep 2005 18:54:54 +0400
<jyu.james@xxxxxxxxx> wrote in message
news:1128090938.862382.28220@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Well, the problem is that I expect my code to actually initialize all
> the global variables. I want to make sure that I'm not missing any
> initializations. I don't want to just go and add artificial
> initializations. Basically, I'm just trying to verify that the
> existing code does initialize all the variables (before reading from
> them).
>
> Any suggestions for that?
Put all those variables into a structure, memset() it to 0. That must make
your code deterministic, even if there must have been something else but 0
in some variable(s).
Alex
.
- References:
- Re: Detecting Reads of Global Uninitialized Variables
- From: junky_fellow
- Re: Detecting Reads of Global Uninitialized Variables
- From: jyu.james@xxxxxxxxx
- Re: Detecting Reads of Global Uninitialized Variables
- Prev by Date: Re: printf execution problem
- Next by Date: Re: offsetof
- Previous by thread: Re: Detecting Reads of Global Uninitialized Variables
- Next by thread: Re: Getting rid of excess #includes
- Index(es):
Relevant Pages
|