Re: regex_t internals: can we use re_magic to tell whether a regex has been regcomp'd?

2011-08-11 Thread Corinna Vinschen
On Aug 10 19:07, Fischer, Matthew L wrote: We are porting code from Linux that is attempting to determine whether a regular expression has been properly regcomp'd and not freed. The code from Linux is looking into the buffer inside regex_t. On Which is kind of scary, IMHO. Using the

regex_t internals: can we use re_magic to tell whether a regex has been regcomp'd?

2011-08-10 Thread Fischer, Matthew L
We are porting code from Linux that is attempting to determine whether a regular expression has been properly regcomp'd and not freed. The code from Linux is looking into the buffer inside regex_t. On Cygwin, the buffer (not the same field name) is hidden inside re_guts which has a comment