Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupted compiled re2 object causes seg fault #30

Open
EliezerIsrael opened this issue Nov 19, 2014 · 0 comments
Open

Corrupted compiled re2 object causes seg fault #30

EliezerIsrael opened this issue Nov 19, 2014 · 0 comments

Comments

@EliezerIsrael
Copy link

This is as much for other users as for the developers.

I'm using re2 in a Django app, and stored a large compiled re2 regex in a Redis cache. When I pulled it out of the cache, the 'pattern' attribute didn't make it out alive - it was 'None'. Naively using the object's 'match' method caused a segmentation fault.

Simple solution - don't store compiled regexs in Redis.

Perhaps there is also room here for the code to fail a bit more gracefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant