I have some C++ code which SWIG can handle perfectly with PHP4, but trying to compile it with PHP5 causes segmentation faults (SWIG segfaulting). I have been able to isolate what seems to cause the problem: some problem handling overloaded functions. I created a very basic testcase to help (see attachements).
The following command will result in a segfault:
swig -c++ -php5 -outdir ./out/ -o ./out/output.cpp input.i
The following 2 commands will compile without a problem:
swig -c++ -php5 -noproxy -outdir ./out/ -o ./out/output.cpp input.i
swig -c++ -php -outdir ./out/ -o ./out/output.cpp input.i
I tried the latest source from SubVersion and even tried the patch for ReqID #1700788 (which had a similar faulty behavior), but it solved nothing. I might be doing something wrong, but since it works fine with PHP4, I guess not.
Log in to post a comment.