asm89 / Rx.PHP

Reactive extensions for PHP.
MIT License
205 stars 24 forks source link

Segmentation Fault #24

Closed davidwdan closed 8 years ago

davidwdan commented 8 years ago

The following code will cause php to seg fault:

$observable = new Rx\Observable\ArrayObservable(range(1, 10000));
$observable->subscribe(new \Rx\Observer\CallbackObserver());

I'm guessing that this has something to do with the recursive actions in the ImmediateScheduler blowing the stack, because it works fine with the VirtualTimeScheduler.

Ocramius commented 8 years ago

Any specific PHP version? Can a test be created to check this?

asm89 commented 8 years ago

Yeah, this is most certainly the ImmediateScheduler which doesn't use any trampolining and will blow up the stack. We should fix that.

davidwdan commented 8 years ago

@Ocramius All versions of PHP 5.5 - 7 on OSX (10.11.1) and Linux (Centos 6.5)