Skip to content
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

Make FFI callbacks thread safe #1

Closed
wants to merge 10,000 commits into from
Closed

Make FFI callbacks thread safe #1

wants to merge 10,000 commits into from

Conversation

smx-smx
Copy link
Owner

@smx-smx smx-smx commented Nov 29, 2023

Makes FFI callbacks work, regardless of the thread they are invoked from

bukka and others added 30 commits November 12, 2023 18:18
* PHP-8.1:
  Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660)
* PHP-8.2:
  Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660)
* PHP-8.3:
  Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660)
…2650)

zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic and flexible arrays.

It is mostly for ubsan and helping array bound checking.
* PHP-8.2:
  Fix GH-12655: proc_open() does not take into account references in the descriptor array
* PHP-8.3:
  Fix GH-12655: proc_open() does not take into account references in the descriptor array
* PHP-8.1:
  NEWS
  fix GH-12661 (Inconsistency in ZipArchive::addGlob remove_path Option Behavior)
* PHP-8.2:
  NEWS
  NEWS
  fix GH-12661 (Inconsistency in ZipArchive::addGlob remove_path Option Behavior)
* PHP-8.3:
  NEWS
  NEWS
  fix GH-12661 (Inconsistency in ZipArchive::addGlob remove_path Option Behavior)
* PHP-8.3:
  NEWS
* PHP-8.3:
  zip extension is 1.22.3
MSAN is slow in particular, leading to potentially higher deviations.
* PHP-8.2:
  [skip ci] Further increase allowable atime deviation
* PHP-8.3:
  [skip ci] Further increase allowable atime deviation
* Improve JIT config in fuzzer SAPI

* Fix

* Fix

* Update
Closes GH-12425
kocsismate and others added 29 commits November 27, 2023 22:09
gen_stub.php references classes inside namespaces relatively
Now that we have class aliases (DOMNode -> DOM\Node), it has become important to add them to the class map so that it will be possible to generate class synopses for them.
* PHP-8.2:
  Align error messages between normal VM and JIT for RW when using object as array (#12799)
* PHP-8.3:
  Align error messages between normal VM and JIT for RW when using object as array (#12799)
Some jobs on GA apparently consume a lot of CPU resources, possibly hindering
communication between master and runner. This only seems to happen on Linux+ASAN
and macOS. For these jobs, keep one core idle.

Closes GH-12742
* PHP-8.2:
  Reduce parallelism on frequently crashing jobs
* PHP-8.3:
  Reduce parallelism on frequently crashing jobs
…ong undefined array key warning (#12817)

* Fixed GH-12812: Integer string in variable used as offset produces wrong undefined array key warning

* Fixed register names
* PHP-8.2:
  Fixed GH-12812: Integer string in variable used as offset produces wrong undefined array key warning (#12817)
* PHP-8.3:
  Fixed GH-12812: Integer string in variable used as offset produces wrong undefined array key warning (#12817)
* Fast path for when there is nothing to trim in mb_trim

* Make mb_trim decide between linear search vs hash table lookup

Using empirical experiments I noticed that on my i7-4790 the hash table
approach becomes faster once we have more than 4 code points in the trim
characters, when evaluated on the worst case.

This patch changes the logic so that a hash table is used for a large
number of trim characters, and linear search when the number of trim
characters is <= 4.
This is _not_ exploitable right now because libxml guarantees right now
a maximum string length of 1M bytes. But if that limit were to ever
change this could overflow in the future leading to exploits.
Again, not exploitable right now, but just making it more future-proof.
* PHP-8.2:
  Fixed GH-8251: Narrowing occurred during type inference of ZEND_FETCH_DIM_W
* PHP-8.3:
  Fixed GH-8251: Narrowing occurred during type inference of ZEND_FETCH_DIM_W
* PHP-8.2:
  [skip ci] Skip resource intensive tidy test on GA
* PHP-8.3:
  [skip ci] Skip resource intensive tidy test on GA
… one

add zend_ffi_wait_request_barrier helper function
add callback_in_progress flag
@smx-smx smx-smx closed this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.