History log of /php-src/TSRM/TSRM.h (Results 1 – 25 of 140)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 2d6bd164 28-Mar-2024 Paul Ripke

Fixed GH-13581: threaded mod_php fails on NetBSD with No space available for Thread Local Storage.

Close GH-13832


# 5941cdaa 13-Feb-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix ZTS crashes with persistent resources in modules (#13381)

On shutdown in ZTS the following happens:
- https://github.com/php/php-src/blob/master/Zend/zend.c#L1124-L1125
gets ex

Fix ZTS crashes with persistent resources in modules (#13381)

On shutdown in ZTS the following happens:
- https://github.com/php/php-src/blob/master/Zend/zend.c#L1124-L1125
gets executed. This destroys global persistent resources and destroys
the modules. Furthermore, the modules are unloaded too.
- Further down, `ts_free_id(executor_globals_id)` gets executed, which
calls `executor_globals_dtor`. This function destroys persistent
resources for each thread.

Notice that in the last step, the modules that the persistent resource
belong to may already have been destroyed. This means that accessing
globals will cause a crash (I previously fixed this with ifdef magic),
or when the module is dynamically loaded we'll try jumping to a
destructor that is no longer loaded in memory. These scenarios cause
crashes.

It's not possible to move the `ts_free_id` call upwards, because that
may break assumptions of callers, and furthermore this would deallocate
the executor globals structure, which means that any access to those
will cause a segfault.

This patch adds a new API to the TSRM that allows running a callback on
a certain resource type. We use this API to destroy the persistent
resources in all threads prior to the module destruction, and keep the
rest of the resource dtor intact.

I verified this fix on Apache with postgres, both dynamically and
statically.

Fixes GH-12974.

show more ...


# 9da75d0c 22-Oct-2022 Kévin Dunglas

fix: no-op when signal handlers are called on threads not managed by PHP (#9766)


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30
# d08451b2 29-May-2022 George Peter Banyard

Replace php_stdint.h header with standard headers (#8613)

Revision tags: php-8.1.7RC1, php-8.0.20RC1
# 5ba6ecd5 24-May-2022 George Peter Banyard

Minor refactoring of main/main.c and TSRM (#8608)

Revision tags: php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28
# 188a6ccd 07-Feb-2022 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Haiku fix ZTS build, disabling tls model


# bea542a9 06-Feb-2022 David Carlier

Haiku fix ZTS build, disabling tls model

Closes GH-8047.

Revision tags: php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1
# 72f8dbb3 24-Nov-2021 Dmitry Stogov

Fixed bug #81634 (ZEND_ENABLE_STATIC_TSRMLS_CACHE produces extensionswith the STATIC_TLS flag)

Revision tags: php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29, php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20
# 804420b0 20-May-2021 Derick Rethans

Detect musl libc to not set tls_model attribute on that platform

This fixes:
``_tsrm_ls_cache: initial-exec TLS resolves to dynamic definition``
in shared extensions.

Revision tags: php-8.0.7RC1, php-7.4.20RC1, php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1, php-8.0.4RC1, php-7.4.17RC1
# 3b377b51 10-Mar-2021 Dmitry Stogov

Fixed bug #80814 (threaded mod_php won't load on FreeBSD: No space available for static Thread Local Storage)

Revision tags: php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19
# 88355dd3 07-Jun-2020 twosee

Constify char * arguments of APIs

Closes GH-5676.

# 1b85e749 06-Jun-2020 twosee

Fix warning of strict-prototypes

Closes GH-5673.

Revision tags: php-7.4.7RC1, php-7.3.19RC1, php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17, php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16, php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14, php-7.3.14RC1, php-7.4.2RC1, php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3, php-7.2.23, php-7.3.10
# e0a213d9 19-Sep-2019 Christoph M. Becker

Make MSVC happy again

MSVC complains about unsupported preprocessor syntax, so we employ the
same workaround as in zend_cpuinfo.h.

# 2aefd112 18-Sep-2019 Dmitry Stogov

Optimize access to thread local cache.

This patch saves one CPU instruction on each "_tsrm_ls_cache" access in ZTS CLI/CGI/FPM builds.
This reduce typical instruction sequence for EG(cur

Optimize access to thread local cache.

This patch saves one CPU instruction on each "_tsrm_ls_cache" access in ZTS CLI/CGI/FPM builds.
This reduce typical instruction sequence for EG(current_execute_data) access from 4 to 3 CPU instructions.

show more ...

Revision tags: php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1
# f99adb4b 10-Jul-2019 Peter Kokot

Merge branch 'PHP-7.4'

* PHP-7.4:
Remove TSRM/tsrm_config.w32.h


# d63fdced 10-Jul-2019 Peter Kokot

Remove TSRM/tsrm_config.w32.h

The tsrm_config.w32.h file is a simple wrapper for already defined
symbols and includes elsewhere.

Closes GH-4383

Revision tags: php-7.4.0alpha3, php-7.3.7, php-7.2.20
# b1ef5009 01-Jul-2019 Peter Kokot

Remove some old BeOS artefacts

- checking for beos systems is no longer relevant in configure.ac
- usage of undefined constant BETHREADS removed.

Closes GH-4346

# b98cd071 28-Jun-2019 Joe Watkins

Merge branch 'PHP-7.4'

* PHP-7.4:
implement tsrm_is_shutdown API


# 68485f8a 26-Jun-2019 Joe Watkins

implement tsrm_is_shutdown API

Revision tags: php-7.4.0alpha2, php-7.3.7RC3, php-7.3.7RC2, php-7.2.20RC2, php-7.4.0alpha1
# 5fd027e3 11-Jun-2019 Joe Watkins

Merge branch 'PHP-7.4'

* PHP-7.4:
This reverts 0e5d4ea55554872fe72e5d984b73fc21abc561fe to fix the build on MacOSX


# 69190ce5 11-Jun-2019 Joe Watkins

This reverts 0e5d4ea55554872fe72e5d984b73fc21abc561fe to fix the build on MacOSX

On Mac thread_local and __thread are not ABI compatible, in addition, thread_local
comes with additional

This reverts 0e5d4ea55554872fe72e5d984b73fc21abc561fe to fix the build on MacOSX

On Mac thread_local and __thread are not ABI compatible, in addition, thread_local
comes with additional overhead, __thread seems to be the most suitable linkage to use
regardless of c++/c

show more ...

Revision tags: php-7.3.7RC1, php-7.2.20RC1
# 623eedbb 04-Jun-2019 Nikita Popov

Merge branch 'PHP-7.4'


# 18060e59 04-Jun-2019 Nikita Popov

Merge branch 'PHP-7.3' into PHP-7.4


# a4633b13 04-Jun-2019 Nikita Popov

Merge branch 'PHP-7.2' into PHP-7.3


# 2d3bc71e 04-Jun-2019 Nikita Popov

Reload tsrmls_id in release builds as well

If TSRM is shut down and started again (something that phpdbg does),
then tsrmls_id needs to be reloaded everywhere. As tsrmls_id
update is

Reload tsrmls_id in release builds as well

If TSRM is shut down and started again (something that phpdbg does),
then tsrmls_id needs to be reloaded everywhere. As tsrmls_id
update is a rare operation, doing that shouldn't be a problem.

show more ...

123456