always compile dynamic REs - caching compiled regexps needs more work
The previous code had some issues: - race: priv_call->priv could be incomplete when being non-null, so using it outside re_mutex was not safe. fix: make sure that the re_t is complete before referencing it in priv_call->priv using a membar - caching dynamic REs did not work because invalid comparison of the cached pattern, also freeing the cached REs was incorrect it could be a good idea to add a global cache for compiled patterns (dynamic or not), but as long as we don't have that, it's probably safest to just recompile dynamic REs always
Showing
Please register or sign in to comment