Skip to content

poc: integrate Rust into PHP as an optional dependency#1

Draft
azjezz wants to merge 6 commits intomasterfrom
rust-build
Draft

poc: integrate Rust into PHP as an optional dependency#1
azjezz wants to merge 6 commits intomasterfrom
rust-build

Conversation

@azjezz
Copy link
Copy Markdown
Member

@azjezz azjezz commented Nov 19, 2025

No description provided.

Signed-off-by: azjezz <azjezz@protonmail.com>
Signed-off-by: azjezz <azjezz@protonmail.com>
Signed-off-by: azjezz <azjezz@protonmail.com>
Signed-off-by: azjezz <azjezz@protonmail.com>
Signed-off-by: azjezz <azjezz@protonmail.com>
Signed-off-by: azjezz <azjezz@protonmail.com>
azjezz pushed a commit that referenced this pull request Apr 1, 2026
On AIX, NSIG is def'd as SIGMAX64+1, and SIGMAX64 itself is def'd as
255:

```
$ grep -Rw SIGMAX64 /QOpenSys/usr/include/
/QOpenSys/usr/include/sys/signal.h:#define SIGMAX64 255
/QOpenSys/usr/include/sys/signal.h:#define SIGMAX SIGMAX64
/QOpenSys/usr/include/sys/signal.h:#define NSIG64               (SIGMAX64+1)
```

...this causes an overflow when we set num_signals from the value of
NSIG, per GCC:

```
/rpmbuild/BUILD/php-8.5.3/ext/pcntl/pcntl.c:216:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  PCNTL_G(num_signals) = NSIG;
                         ^~~~
```

...when we try to use pcntl to i.e. install a signal handler, we get an
error from pcntl:

```
Fatal error: Uncaught ValueError: pcntl_signal(): Argument #1 ($signal) must be less than 0 in phar:///QOpenSys/pkgs/bin/composer/vendor/seld/signal-handler/src/SignalHandler.php:491
```

The easiest way to deal with this silly AIX behaviour is to just promote
the storage size.
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.

1 participant