facebook/hiphop-php — Issue #430: hphp crashs on some php code
Author: jdespatis
Created: 2011-11-17 08:14:53+00:00
State: open

First hphp is running nicely when it analyses ezpublish.
However when I add a library (eZComponents) in eZPublish to analyse both of them, I get a crash, here is a backtrace:

```
(gdb) thread apply all backtrace

Thread 12 (Thread 0xb6e0eb70 (LWP 10458)):
#0 0x084fca3a in HPHP::Expression::checkTypesImpl(boost::shared_ptr, boost::shared_ptr, boost::shared_ptr, bool) ()
#1 0x0852cf24 in HPHP::ScalarExpression::inferenceImpl(boost::shared_ptr, boost::shared_ptr, bool) ()
#2 0x0852d1e9 in HPHP::ScalarExpression::inferAndCheck(boost::shared_ptr, boost::shared_ptr, bool) ()
#3 0x083c5a27 in HPHP::CaseStatement::inferAndCheck(boost::shared_ptr, boost::shared_ptr, bool) ()
#4 0x0857fcae in HPHP::SwitchStatement::inferTypes(boost::shared_ptr) ()
#5 0x083be6e3 in HPHP::StatementList::inferTypes(boost::shared_ptr) ()
#6 0x083ac7cd in HPHP::MethodStatement::inferFunctionTypes(boost::shared_ptr) ()
#7 0x083d637b in HPHP::DepthFirstVisitor::visitScope(HPHP::hphp_raw_ptr)
()
#8 0x0841b026 in HPHP::OptWorker::doJob(HPHP::BlockScope*) ()
#9 0x083ffcc8 in HPHP::JobQueueWorker::start() ()
#10 0x08370748 in HPHP::AsyncFuncImpl::threadFuncImpl() ()
#11 0x0837096d in HPHP::AsyncFuncImpl::ThreadFunc(void*) ()
#12 0x00892d31 in start_thread (arg=0xb6e0eb70) at pthread_create.c:304
#13 0x0113e0ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 11 (Thread 0xb660cb70 (LWP 10457)):
#0 0x085345f0 in HPHP::ObjectPropertyExpression::inferTypes(boost::shared_ptr, boost::shared_ptr, bool) ()
#1 0x084fcf7f in HPHP::Expression::inferAndCheck(boost::shared_ptr, boost::shared_ptr, bool)
()
#2 0x084fbc59 in HPHP::Expression::inferAssignmentTypes(boost::shared_ptr, boost::shared_ptr, bool, boost::shared_ptr, boost::shared_ptr) ()
#3 0x08543035 in HPHP::AssignmentExpression::inferTypes(boost::shared_ptr, boost::shared_ptr, bool) ()
#4 0x084fcf7f in HPHP::Expression::inferAndCheck(boost::shared_ptr, boost::shared_ptr, bool)
()
#5 0x083c74ae in HPHP::ExpStatement::inferTypes(boost::shared_ptr) ()
#6 0x083be6e3 in HPHP::StatementList::inferTypes(boost::shared_ptr) ()
#7 0x083c5aa5 in HPHP::CaseStatement::inferAndCheck(boost::shared_ptr, boost::shared_ptr, bool) ()
#8 0x0857fcae in HPHP::SwitchStatement::inferTypes(boost::shared_ptr) ()
#9 0x083be6e3 in HPHP::StatementList::inferTypes(boost::shared_ptr) ()
#10 0x083ac7cd in HPHP::MethodStatement::inferFunctionTypes(boost::shared_ptr) ()
#11 0x083d637b in HPHP::DepthFirstVisitor::visitScope(HPHP::hphp_raw_ptr)
()
#12 0x0841b026 in HPHP::OptWorker::doJob(HPHP::BlockScope*) ()
#13 0x083ffcc8 in HPHP::JobQueueWorker::start() ()
#14 0x08370748 in HPHP::AsyncFuncImpl::threadFuncImpl() ()
#15 0x0837096d in HPHP::AsyncFuncImpl::ThreadFunc(void*) ()
#16 0x00892d31 in start_thread (arg=0xb660cb70) at pthread_create.c:304
#17 0x0113e0ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 1 (Thread 0xb7187a70 (LWP 10445)):
#0 0x00130416 in __kernel_vsyscall ()
#1 0x00896a5c in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2 0x08416437 in void HPHP::AnalysisResult::processScopesParallel(char const*, void*) ()
#3 0x083efa0d in HPHP::AnalysisResult::inferTypes() ()
#4 0x08367dca in analyzeTarget(ProgramOptions const&, boost::shared_ptr) ()
#5 0x08368206 in cppTarget(ProgramOptions const&, boost::shared_ptr, AsyncFileCacheSaver&, bool) ()
#6 0x083688f1 in runTargetCheck(ProgramOptions const&, boost::shared_ptr, AsyncFileCacheSaver&) ()
#7 0x0836aa4e in process(ProgramOptions const&) ()
#8 0x08340474 in main ()
(gdb)
```