cphalcon: [BUG] Conflict of C code

Hello.

I get a segmentation fault in my application, but i don’t understand why:

[28-Sep-2019 18:55:37] WARNING: [pool test] child 69480 exited on signal 11 (SIGSEGV - core dumped) after 386.591562 seconds from start

So, I know that fault is happening in Phalcon\View or Phalcon\View\Volt, but I don’t know exactly where =( In xdebug trace i don’t found nothing useful

Who can give me advice?

P.S. My phalcon version is 4.0.0-rc.1, php is 7.3.9, mac os.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 33 (13 by maintainers)

Most upvoted comments

@TimurFlush Thank you for this report.

If this fixes your problem then let’s close this issue and open one for further investigation with the code that does produce the segfault. I know Zephir doesn’t like method properties in closures so we need to work on that. Perhaps they are related.

In the new issue, if you can, can you please attach a sample script that we can work with?

@ekmst This is not related to what @TimurFlush is experiencing. Your error comes from the calculation of the protocol when using the SERVER_PROTOCOL

I can see that it is HTTP/1.1. Now from your message

Unsupported protocol HTTP/1.1

there is a mishap with the logic in the code when we split the protocol to figure out its number. Since the code returns HTTP/1.1 vs 1.1 there is no match and therefore the error.

It is weird though because I wrote tests on that and they all passed. I will have a look at it again, maybe simplify the code a bit.

This is where the error comes from: https://github.com/phalcon/cphalcon/blob/4.0.x/phalcon/Http/Message/ServerRequestFactory.zep#L486