Philippe Lhoste:

Is there risk of reading in nfa at uninitialized addresses?

  I couldn't find any way to do this with some simple examples. If
Dan has an example then it could be used to ensure that there is no
reading of not set data. Initializing the whole array may just be
hiding a real problem although it does make the code more reliable.
Zeroing 2048 bytes appears a bit wasteful.

Otherwise, I don't see the point, nfa is filled in RESearch::Compile
Of course, better ready than sorry...
There is another uninitialized buffer: tagstk

Oh, and what about using memset? :-)

  There is unlikely to be any speed difference. I've seen more bugs
with parameters to memset (mostly forgetting the element size) than
explicit loops although it can be tamed with something like

#define ZEROMEM(x) memset(&x,0,sizeof(x))

  Neil
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to