[php-src] Issue #8159: Apache / PHP segfaults (PHP 8.0 and 8.1, but also 7.4)
| From: | unix-world | Date: | Mon, 07 Mar 2022 10:58:06 +0000 |
| Subject: | [php-src] Issue #8159: Apache / PHP segfaults (PHP 8.0 and 8.1, but also 7.4) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240246@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8159
Comment Author: unix-world
When building from the source the PHP 8.0,
I recorded several warnings I have seen:
```
/_PORTS/pobj/php-8.0.16/php-8.0.16/sapi/apache2handler/apache_config.c:213:7: warning: missing field
'func' initializer [-Wmissing-field-initializers]
{NULL}
^
```
```
/_PORTS/pobj/php-8.0.16/php-8.0.16/ext/shmop/shmop.c:203:20: warning: result of comparison of
constant 9223372036854775807 with expression of type 'int' is always false
[-Wtautological-constant-out-of-range-compare]
if (shm.shm_segsz > ZEND_LONG_MAX) {
~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
```
```
In file included from /_PORTS/pobj/php-8.0.16/php-8.0.16/ext/opcache/jit/zend_jit.c:215:
In file included from ext/opcache/jit/zend_jit_disasm_x86.c:25:
ext/opcache/jit/libudis86/syn.c:144:49: warning: format specifies type 'long' but the
argument has type 'int64_t' (aka 'long long') [-Wformat]
ud_asmprintf(u, "%s%+" FMT64 "d", name, offset);
~~~~~~~~~~~~ ^~~~~~
%+lld
ext/opcache/jit/libudis86/syn.c:151:36: warning: format specifies type 'unsigned long' but
the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
ud_asmprintf(u, "0x%" FMT64 "x", addr);
~~~~~~~~~~~ ^~~~
%llx
ext/opcache/jit/libudis86/syn.c:184:51: warning: format specifies type 'long' but the
argument has type 'int64_t' (aka 'long long') [-Wformat]
ud_asmprintf(u, "%s%+" FMT64 "d", name, offset);
~~~~~~~~~~~~ ^~~~~~
%+lld
ext/opcache/jit/libudis86/syn.c:192:36: warning: format specifies type 'unsigned long' but
the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
ud_asmprintf(u, "0x%" FMT64 "x", v);
~~~~~~~~~~~ ^
%llx
ext/opcache/jit/libudis86/syn.c:216:51: warning: format specifies type 'long' but the
argument has type 'int64_t' (aka 'long long') [-Wformat]
ud_asmprintf(u, "%s%+" FMT64 "d", name, offset);
~~~~~~~~~~~~ ^~~~~~
%+lld
ext/opcache/jit/libudis86/syn.c:224:38: warning: format specifies type 'unsigned long' but
the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
ud_asmprintf(u, "0x%" FMT64 "x", v);
~~~~~~~~~~~ ^
%llx
ext/opcache/jit/libudis86/syn.c:240:51: warning: format specifies type 'long' but the
argument has type 'int64_t' (aka 'long long') [-Wformat]
ud_asmprintf(u, "%s%+" FMT64 "d", name, offset);
~~~~~~~~~~~~ ^~~~~~
%+lld
ext/opcache/jit/libudis86/syn.c:249:41: warning: format specifies type 'unsigned long' but
the argument has type 'int64_t' (aka 'long long') [-Wformat]
ud_asmprintf(u, "-0x%" FMT64 "x", -v);
~~~~~~~~~~~ ^~
%llx
ext/opcache/jit/libudis86/syn.c:251:58: warning: format specifies type 'unsigned long' but
the argument has type 'int64_t' (aka 'long long') [-Wformat]
ud_asmprintf(u, "%s0x%" FMT64 "x", sign? "+" : "", v);
~~~~~~~~~~~ ^
%llx
9 warnings generated.
```
```
In file included from /_PORTS/pobj/php-8.0.16/php-8.0.16/ext/opcache/jit/zend_jit.c:215:
In file included from ext/opcache/jit/zend_jit_disasm_x86.c:25:
ext/opcache/jit/libudis86/syn.c:144:49: warning: format specifies type 'long' but the
argument has type 'int64_t' (aka 'long long') [-Wformat]
ud_asmprintf(u, "%s%+" FMT64 "d", name, offset);
~~~~~~~~~~~~ ^~~~~~
%+lld
ext/opcache/jit/libudis86/syn.c:151:36: warning: format specifies type 'unsigned long' but
the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
ud_asmprintf(u, "0x%" FMT64 "x", addr);
~~~~~~~~~~~ ^~~~
%llx
ext/opcache/jit/libudis86/syn.c:184:51: warning: format specifies type 'long' but the
argument has type 'int64_t' (aka 'long long') [-Wformat]
ud_asmprintf(u, "%s%+" FMT64 "d", name, offset);
~~~~~~~~~~~~ ^~~~~~
%+lld
ext/opcache/jit/libudis86/syn.c:192:36: warning: format specifies type 'unsigned long' but
the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
ud_asmprintf(u, "0x%" FMT64 "x", v);
~~~~~~~~~~~ ^
%llx
ext/opcache/jit/libudis86/syn.c:216:51: warning: format specifies type 'long' but the
argument has type 'int64_t' (aka 'long long') [-Wformat]
ud_asmprintf(u, "%s%+" FMT64 "d", name, offset);
~~~~~~~~~~~~ ^~~~~~
%+lld
ext/opcache/jit/libudis86/syn.c:224:38: warning: format specifies type 'unsigned long' but
the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
ud_asmprintf(u, "0x%" FMT64 "x", v);
~~~~~~~~~~~ ^
%llx
ext/opcache/jit/libudis86/syn.c:240:51: warning: format specifies type 'long' but the
argument has type 'int64_t' (aka 'long long') [-Wformat]
ud_asmprintf(u, "%s%+" FMT64 "d", name, offset);
~~~~~~~~~~~~ ^~~~~~
%+lld
ext/opcache/jit/libudis86/syn.c:249:41: warning: format specifies type 'unsigned long' but
the argument has type 'int64_t' (aka 'long long') [-Wformat]
ud_asmprintf(u, "-0x%" FMT64 "x", -v);
~~~~~~~~~~~ ^~
%llx
ext/opcache/jit/libudis86/syn.c:251:58: warning: format specifies type 'unsigned long' but
the argument has type 'int64_t' (aka 'long long') [-Wformat]
ud_asmprintf(u, "%s0x%" FMT64 "x", sign? "+" : "", v);
~~~~~~~~~~~ ^
%llx
9 warnings generated.
```
```
/_PORTS/pobj/php-8.0.16/php-8.0.16/sapi/fpm/fpm/fpm_log.c:217:56: warning: format specifies type
'unsigned long' but the argument has type 'unsigned long long' [-Wformat]
len2 = snprintf(b, FPM_LOG_BUFFER - len,
"%lu", proc.duration.tv_sec * 1000000UL + proc.duration.tv_usec);
~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%llu
1 warning generated.
```