[nycphp-talk] segmentation fault
Carlos A Hoyos
cahoyos at us.ibm.com
Fri Mar 5 18:56:56 EST 2004
Has anyone encountered a segmentation fault before? Any hints on how to
debug?
I have a simple script that open a set of urls and saves them locally. This
script is called through a fork on a page, and I noticed that very rarely
the process died before finishing the download.
After investigating a bit, I found out that calling the process from the
command line (or through a web page) gave me a segmentation fault.
I thought I could reproduce the problem (it was happening only with certain
parameters) but when it does happen, it will abort execution without
echoing anything, so debuging through echo statements did not working.
I started commenting sections of the code and managed to narrow the
problem to a call to file_get_contents (segmentation wouldn't happen with
other urls, so I thought I had it), but even so, the problem doesn't happen
all the time. I'm running PHP 4.3.1
Carlos Hoyos, Application Developer, ibm.com
1133 Westchester Ave, # 2e 524,
White Plains, NY 10604
914.642.3569 | t/l 224.3569
cahoyos at us.ibm.com
More information about the talk
mailing list