aedart's avatar

[L5.1][php7] Segmentation fault during API integration test: how to debug?

I have just switched to the latest version of homestead (0.3.3), running PHP7, but unfortunately I am getting a "Segmentation fault" when executing my integration tests. The tests are doing nothing more than testing CRUD for a custom Json API.

However, after spending some time searching on the web for "how to debug segmentation fault" (any many other variations of this search term), I pretty much gave up understanding how to debug such an issue, in PHP7. Does anyone have a "very easy to understand" guide on how to debug this?

GDB

I have installed gdb (https://www.gnu.org/software/gdb/), yet fail to understand how to use it, in order to execute the given test(s) and get some kind of stack trace. When it comes to these kind of issues, I am a complete noob!

Other information

Using codeception, running a few migrations, seeding and authenticating a test-user on the API before each test. Using the good old dd() method, I have localised the problem to be somewhere \Illuminate\Foundation\Testing\CrawlerTrait::get() method. Attempted to dig deeper into the method and add manual debug-traces between each line of code, yet somehow I'm not able to trigger the segmentation fault...

0 likes
0 replies

Please or to participate in this conversation.