-
Notifications
You must be signed in to change notification settings - Fork 83
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
SIGSEGV with native C extension when IP queried is null/empty string #96
Comments
I get |
You are right, I can not reproduce it with simple code. Try this instead:
I get this when running under GDB. This does not happen if extension is not installed.
|
Please find attached output of In case it's of importance, we're using older version of jemalloc than available in Buster repos. (Debian refers to it as libjemalloc1 as opposed to libjemalloc2)
|
Thanks. I am still unable to reproduce it with the provided script and the Ubuntu PHP 7.3 package ( Could you also get a backtrace from gdb? |
No, this did not happen on 1.4.1 with libmaxminddb 1.3.2. Of note is also the fact that upgrading to 1.5.1 from 1.5.0 breaks compatibility with extension below 1.5.0 due to usage of Note that SIGSEGV happens only when Here's backtrace you asked for.
|
Here's another backtrace for mutation of script:
|
Even with the
Based on the trace, I'd guess the issue is |
Yes the problem seems to lie with |
I haven't tried setting up a Buster environment yet. Looking at the |
Sadly this does not solve the issue. I've tested this without libjemalloc1 on Buster (by removing it and recompiling lib and extension) and it seems to happen anyway, so most likely not a culprit. |
That's too bad. I am trying to build a Buster environment that matches yours. How did you install libmaxminddb? Buster seems to only have 1.3.2. |
Directly from source as per instructions
|
Unfortunately, I am still unable to reproduce it:
Using the |
Hi again, Sorry for late response, this took way too long to debug than I expected. So, the issue looks like memory corruption but it manifests only when sufficient stuff is happening in PHP, for example due to PSR-0. For example, please try using this
For me it ends up with this:
Adding
at the end causes SIGSEGV. Here's list of packages I install for debug environment:
|
Thanks. I just got back to this and I am now able to reproduce the issue. |
Would you be able to test #98 to check that it resolves the issue for you? |
This does indeed fix the issue. Thanks. |
As simple as that.
Example code:
The text was updated successfully, but these errors were encountered: