Debugging a segfault in PHP

debugging segfaults is not fun.
My low key technique:

  1. place a printf(“made it here: %s, %s+ %sn”, __METHOD__, __LINE__, __FILE__); everywhere…
  2. put “DIE(‘something’);” to figure out the exact line that fails.  If dies, good.  move it further down.  If it segfaults, move the die statement up.  Until you’ve found the exact line that fails.
  3. Figure out why it’s segfaulting…  uh… good luck with that.  Google, and look at the changelog in PHP to see if it’s been fixed.

An easier option, if I were the one controlling the box — Update to the latest PHP.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *