Skip to content

Fibers appear to be broken on FreeBSD i386 #9566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
arnaud-lb opened this issue Sep 17, 2022 · 0 comments
Closed

Fibers appear to be broken on FreeBSD i386 #9566

arnaud-lb opened this issue Sep 17, 2022 · 0 comments

Comments

@arnaud-lb
Copy link
Member

Description

Not sure that this is a supported platform, but fibers appear to be broken on FreeBSD i386.

The following code:

<?php

$fiber = new Fiber(function() {
});

$fiber->start();

Resulted in this output:

Segmentation fault (core dumped)

But I expected this output instead:

gdb:

gdb --args sapi/cli/php test.php
(gdb) r
Starting program: sapi/cli/php test.php

Program received signal SIGSEGV, Segmentation fault.
Address not mapped to object.
jump_fcontext () at Zend/asm/jump_i386_sysv_elf_gas.S:60
60	    movl  %ecx, (%eax)
(gdb) list
55	    movl  %eax, %esp
56	
57	    /* address of returned transport_t */
58	    movl 0x1c(%esp), %eax
59	    /* return parent fcontext_t */
60	    movl  %ecx, (%eax)
61	    /* return data */
62	    movl %edx, 0x4(%eax)
63	
64	    movl  0x18(%esp), %ecx  /* restore EIP */
(gdb) bt
#0  jump_fcontext () at Zend/asm/jump_i386_sysv_elf_gas.S:60
#1  0x21059000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

PHP Version

master 17b0e49

Operating System

FreeBSD 13.0 i386

devnexen added a commit to devnexen/php-src that referenced this issue Sep 17, 2022
preparing in case there is more architectures especially the not
 tested.
devnexen added a commit to devnexen/php-src that referenced this issue Sep 17, 2022
preparing in case there is more architectures especially the not
 tested.
devnexen added a commit to devnexen/php-src that referenced this issue Sep 18, 2022
preparing in case there is more architectures especially the not tested.
devnexen added a commit that referenced this issue Oct 10, 2022
preparing in case there is more architectures especially the not tested.
cmb69 added a commit that referenced this issue Oct 10, 2022
* PHP-8.2:
  Fix GH-9589: dl() segfaults when module is already loaded
  Fix GH-9566: disable assembly for Fiber on FreeBSD i386.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants