Skip to content

TSRM: don't use initial-exec on AIX - #23145

Merged
arnaud-lb merged 1 commit into
php:PHP-8.4from
NattyNarwhal:aix-tsrm
Aug 11, 2026
Merged

TSRM: don't use initial-exec on AIX#23145
arnaud-lb merged 1 commit into
php:PHP-8.4from
NattyNarwhal:aix-tsrm

Conversation

@NattyNarwhal

Copy link
Copy Markdown
Member

If building for ZTS, it seems that local-exec can sneak in:

PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /QOpenSys/pkgs/lib/php-8.6/extensions/intl (   0509-022 Cannot load module /QOpenSys/pkgs/lib/php-8.6/extensions/intl.
        0509-026 System error: A file or directory in the path name does not exist.), /QOpenSys/pkgs/lib/php-8.6/extensions/intl.so (   0509-130 Symbol resolution failed for /QOpenSys/pkgs/lib/php-8.6/extensions/intl.so because:
        0509-189 Module /QOpenSys/pkgs/lib/php-8.6/extensions/intl.so is loaded dynamically,
                  but the initial-exec model is used by the module
                  to refer to its own thread-local variables.
        0509-191 Examine .loader section relocation entries with the
                 'dump -Rv' command.
        0509-192 Examine .loader section symbols with the
                 'dump -Tv' command.)) in Unknown on line 0

When inspecting the module for initial-exec:

$ dump -Rv /QOpenSys/pkgs/lib/php-8.6/extensions/intl.so | grep TLS_In
        0x20014370  0x000001fb TLS_InExc      0x0003     _tsrm_ls_cache

It seems it only was in ext/intl/timezone/timezone_class.cpp. However, it seems prudent to just not use local-exec for this case since it seems to be an optimization only really possible on glibc; play it safe elsewhere. (Perhaps this should be really an ifdef GLIBC check?)

@arnaud-lb arnaud-lb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Should this target 8.4 ?

If building for ZTS, it seems that local-exec can sneak in:

```
PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /QOpenSys/pkgs/lib/php-8.6/extensions/intl (   0509-022 Cannot load module /QOpenSys/pkgs/lib/php-8.6/extensions/intl.
        0509-026 System error: A file or directory in the path name does not exist.), /QOpenSys/pkgs/lib/php-8.6/extensions/intl.so (   0509-130 Symbol resolution failed for /QOpenSys/pkgs/lib/php-8.6/extensions/intl.so because:
        0509-189 Module /QOpenSys/pkgs/lib/php-8.6/extensions/intl.so is loaded dynamically,
                  but the initial-exec model is used by the module
                  to refer to its own thread-local variables.
        0509-191 Examine .loader section relocation entries with the
                 'dump -Rv' command.
        0509-192 Examine .loader section symbols with the
                 'dump -Tv' command.)) in Unknown on line 0
```

When inspecting the module for initial-exec:

```
$ dump -Rv /QOpenSys/pkgs/lib/php-8.6/extensions/intl.so | grep TLS_In
        0x20014370  0x000001fb TLS_InExc      0x0003     _tsrm_ls_cache
```

It seems it only was in `ext/intl/timezone/timezone_class.cpp`. However,
it seems prudent to just not use local-exec for this case since it seems
to be an optimization only really possible on glibc; play it safe
elsewhere. (Perhaps this should be really an ifdef GLIBC check?)
@NattyNarwhal
NattyNarwhal changed the base branch from master to PHP-8.4 August 10, 2026 17:48
@NattyNarwhal

Copy link
Copy Markdown
Member Author

Updated to target 8.4... somehow the rebase didn't break this time :)

@arnaud-lb
arnaud-lb merged commit 618d99b into php:PHP-8.4 Aug 11, 2026
18 checks passed
arnaud-lb added a commit that referenced this pull request Aug 11, 2026
* PHP-8.5:
  TSRM: don't use initial-exec on AIX (#23145)
@arnaud-lb

Copy link
Copy Markdown
Member

Thank you!

pull Bot pushed a commit to ConnectionMaster/php-src that referenced this pull request Aug 11, 2026
* PHP-8.4:
  TSRM: don't use initial-exec on AIX (php#23145)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants