Skip to content

[PHP.wasm] Emscripten v4.0.19 won't crash on php crash test #2922

@mho22

Description

@mho22

Mentionned in this pull request.

Upgrading emscripten will make the Does not crash due to an unhandled Asyncify error fail successfully.

It looks like it doesn't crash anymore.

It should normally crash in 7.2 7.3 7.4 8.0 8.1 with the following stack trace :

RuntimeError: unreachable
    at zend_execute_scripts (wasm://wasm/php.wasm-06d40b82:1:6054295)
    at dynCall_iiiii (wasm://wasm/php.wasm-06d40b82:1:16108803)
    at Object.ret.<computed> [as dynCall_iiiii] (wordpress-playground/packages/php-wasm/node/asyncify/php_7_4.js:18430:15)
    at invoke_iiiii (wordpress-playground/packages/php-wasm/node/asyncify/php_7_4.js:35248:34)
    at php_execute_script (wasm://wasm/php.wasm-06d40b82:1:5567965)
    at dynCall_ii (wasm://wasm/php.wasm-06d40b82:1:16108348)
    at Object.ret.<computed> [as dynCall_ii] (wordpress-playground/packages/php-wasm/node/asyncify/php_7_4.js:18430:15)
    at invoke_ii (wordpress-playground/packages/php-wasm/node/asyncify/php_7_4.js:35270:31)
    at wasm_sapi_handle_request (wasm://wasm/php.wasm-06d40b82:1:6806886)
    at ret.<computed> (wordpress-playground/packages/php-wasm/node/asyncify/php_7_4.js:18430:15) {
  cause: Error:
      at Object.Asyncify.handleSleep (wordpress-playground/packages/php-wasm/node/asyncify/php_7_4.js:35895:41)
      at returnCallback (wordpress-playground/packages/php-wasm/node/asyncify/php_7_4.js:32206:49)
      at wasm_poll_socket (wordpress-playground/packages/php-wasm/node/asyncify/php_7_4.js:32213:10)
      at php_pollfd_for (wasm://wasm/php.wasm-06d40b82:1:6801372)
      at php_sockop_read (wasm://wasm/php.wasm-06d40b82:1:5716644)
      at php_openssl_sockop_io (wasm://wasm/php.wasm-06d40b82:1:2452438)
      at php_openssl_sockop_read (wasm://wasm/php.wasm-06d40b82:1:2454068)
      at _php_stream_fill_read_buffer (wasm://wasm/php.wasm-06d40b82:1:5655656)
      at _php_stream_get_line (wasm://wasm/php.wasm-06d40b82:1:5660030)
      at php_stream_url_wrap_http_ex (wasm://wasm/php.wasm-06d40b82:1:5228125)
}

Or crash in 8.2 8.3 8.4 with the following stack trace :

RuntimeError: null function or function signature mismatch
    at execute_ex (wasm://wasm/php.wasm-08397aae:1:6669762)
    at zend_execute (wasm://wasm/php.wasm-08397aae:1:6671059)
    at zend_execute_scripts (wasm://wasm/php.wasm-08397aae:1:6496558)
    at dynCall_iiiii (wasm://wasm/php.wasm-08397aae:1:19958419)
    at Object.ret.<computed> [as dynCall_iiiii] (wordpress-playground/packages/php-wasm/node/asyncify/php_8_2.js:18438:15)
    at invoke_iiiii (wordpress-playground/packages/php-wasm/node/asyncify/php_8_2.js:35262:34)
    at php_execute_script (wasm://wasm/php.wasm-08397aae:1:5964098)
    at dynCall_ii (wasm://wasm/php.wasm-08397aae:1:19957964)
    at Object.ret.<computed> [as dynCall_ii] (wordpress-playground/packages/php-wasm/node/asyncify/php_8_2.js:18438:15)
    at invoke_ii (wordpress-playground/packages/php-wasm/node/asyncify/php_8_2.js:35284:31) {
  cause: Error:
      at Object.Asyncify.handleSleep (wordpress-playground/packages/php-wasm/node/asyncify/php_8_2.js:36102:41)
      at returnCallback (wordpress-playground/packages/php-wasm/node/asyncify/php_8_2.js:32206:49)
      at wasm_poll_socket (wordpress-playground/packages/php-wasm/node/asyncify/php_8_2.js:32213:10)
      at php_pollfd_for (wasm://wasm/php.wasm-08397aae:1:7679108)
      at php_sockop_read (wasm://wasm/php.wasm-08397aae:1:6116157)
      at php_openssl_sockop_io (wasm://wasm/php.wasm-08397aae:1:2692270)
      at php_openssl_sockop_read (wasm://wasm/php.wasm-08397aae:1:2693900)
      at _php_stream_fill_read_buffer (wasm://wasm/php.wasm-08397aae:1:6049743)
      at _php_stream_get_line (wasm://wasm/php.wasm-08397aae:1:6054233)
      at php_stream_url_wrap_http_ex (wasm://wasm/php.wasm-08397aae:1:5624220)
}

What happened ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions