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

crash with mariadb and jemalloc #15

Open
vuvova opened this issue May 4, 2014 · 1 comment
Open

crash with mariadb and jemalloc #15

vuvova opened this issue May 4, 2014 · 1 comment

Comments

@vuvova
Copy link

vuvova commented May 4, 2014

See https://mariadb.atlassian.net/browse/MDEV-6005 and in particular the last comment (https://mariadb.atlassian.net/browse/MDEV-6005?focusedCommentId=48714) that explains the bug

@trident-ms
Copy link

Solved. Not very elegant, but working.
I submit this diff patch which consists in differentiating the two calls at pregMoveToReturnValues made in lib_mysqludf_preg_replace.c and in lib_mysqludf_preg_capture.c with a seventh parameter indicating to pregMoveToReturnValues the way to free the memory allocated to parameter "s" (in lib_mysqludf_preg_replace.c was allocated by pregReplace with memcpyand supposed to be freed by free() and in lib_mysqludf_preg_capture.c was allocated by pcre_get_substring and supposed to be freed by pcre_free_substring() ).

patch.txt

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

2 participants