-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
phpunit9+mockery Segfault #149
Comments
- named param support was apparently missing or broken - cufa may corrupt heap if it tries to free fci.params
I done some stabbing, any good ? |
With HEAD (93b5675) the segfault has moved, but there is still a heap issue. But I think this one is simply that it is getting a null
|
Well clazz is optimized away in the find_mock call, but the tolower call seems to have a valid address ... and this is the relevant lines:
So, clazz, is a constant string, it must not be null. I think we're looking at the result of corruption, but some other code is doing the actual corruption. |
Does valgrind have anything useful to say maybe ? |
Yeah, I am going to give it a shot. But running this whole thing without Valgrind takes a good 20 minutes. I'll probably have to leave it overnight running under Valgrind's memcheck. |
We've made many changes, any change here ? |
No, still corruption somewhere. I am still chasing it.
|
This is a group of about 74k unit tests in a massive code base. There are other groups, but this is the largest and was the one that segfaulted if I ran the whole group via |
Is that still an issue? |
There is a segfault in here somewhere, but I haven't been able to narrow down a simple reproduce case. It only seems to happen when I run an entire test suite. It always crashes in the same spot, but doesn't crash if I just run the particular test file where the crash happens.
The backtrace looks like this:
the
call_user_func_array()
call overridden by uopz in frame 14 is this phpunit9+Mockery call https://github.com/mockery/mockery/blob/master/library/Mockery.php#L117and the
array_map()
call in frame 10 is https://github.com/mockery/mockery/blob/master/library/Mockery/Generator/DefinedTargetClass.php#L56-L58 where we can see the source of theuopz_vm_new()
How exactly that ends up corrupting the heap allocator there is the question.
I know it is not nearly enough to go on, and I will update when I get closer to it. Filing in case others are seeing it too and might have a simpler reproduce case.
The text was updated successfully, but these errors were encountered: