[php-src] Issue #10962: Completely unnecessary compiler warnings In function ‘dasm_setupglobal’
| From: | VARGA-Peter | Date: | Tue, 28 Mar 2023 11:13:00 +0000 |
| Subject: | [php-src] Issue #10962: Completely unnecessary compiler warnings In function ‘dasm_setupglobal’ | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-244028@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/10962
Author: VARGA-Peter
### Description
/bin/sh /builds/php-8.2.4/libtool --silent --preserve-dup-deps --tag CC --mode=compile gcc-12
-Iext/opcache/ -I/builds/php-8.2.4/ext/opcache/ -I/builds/php-8.2.4/include -I/builds/php-8.2.4/main
-I/builds/php-8.2.4 -I/builds/php-8.2.4/ext/date/lib -I/usr/include/libxml2
-I/usr/include/libpng16 -I/builds/php-8.2.4/ext/mbstring/libmbfl
-I/builds/php-8.2.4/ext/mbstring/libmbfl/mbfl -I/builds/php-8.2.4/TSRM -I/builds/php-8.2.4/Zend
-D_GNU_SOURCE -D_REENTRANT -pthread -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond
-Wno-clobbered -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -Wno-sign-compare -g -O2
-fvisibility=hidden -pthread -Wimplicit-fallthrough=1 -DZTS -DZEND_SIGNALS
-Wno-implicit-fallthrough -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DZEND_COMPILE_DL_EXT=1 -c
/builds/php-8.2.4/ext/opcache/jit/zend_jit.c -o ext/opcache/jit/zend_jit.lo -MMD -MF
ext/opcache/jit/zend_jit.dep -MT ext/opcache/jit/zend_jit.lo
In file included from /builds/php-8.2.4/ext/opcache/jit/zend_jit.c:710:
In function ‘dasm_setupglobal’,
inlined from ‘zend_jit_trace_allocate_exit_group’ at ext/opcache/jit/zend_jit_trace.c:95:2,
inlined from ‘zend_jit_trace_allocate_exit_point’ at
ext/opcache/jit/zend_jit_trace.c:125:11:
/builds/php-8.2.4/ext/opcache/jit/dynasm/dasm_x86.h:127:19: warning: array subscript -10 is outside
array bounds of ‘void *[38]’ [-Warray-bounds]
127 | D->globals = gl - 10; /* Negative bias to compensate for locals. */
| ~~~^~~~
In file included from /builds/php-8.2.4/ext/opcache/jit/zend_jit.c:768:
/builds/php-8.2.4/ext/opcache/jit/zend_jit_x86.dasc: In function
‘zend_jit_trace_allocate_exit_point’:
/builds/php-8.2.4/ext/opcache/jit/zend_jit_x86.dasc:143:14: note: at offset -80 into object
‘dasm_labels’ of size 304
143 | static void* dasm_labels[zend_lb_MAX];
| ^~~~~~~~~~~
In function ‘dasm_setupglobal’,
inlined from ‘zend_jit’ at /builds/php-8.2.4/ext/opcache/jit/zend_jit.c:2729:2:
/builds/php-8.2.4/ext/opcache/jit/dynasm/dasm_x86.h:127:19: warning: array subscript -10 is outside
array bounds of ‘void *[38]’ [-Warray-bounds]
127 | D->globals = gl - 10; /* Negative bias to compensate for locals. */
| ~~~^~~~
/builds/php-8.2.4/ext/opcache/jit/zend_jit_x86.dasc: In function ‘zend_jit’:
/builds/php-8.2.4/ext/opcache/jit/zend_jit_x86.dasc:143:14: note: at offset -80 into object
‘dasm_labels’ of size 304
143 | static void* dasm_labels[zend_lb_MAX];
| ^~~~~~~~~~~
In function ‘dasm_setupglobal’,
inlined from ‘zend_jit_trace’ at ext/opcache/jit/zend_jit_trace.c:4054:2:
/builds/php-8.2.4/ext/opcache/jit/dynasm/dasm_x86.h:127:19: warning: array subscript -10 is outside
array bounds of ‘void *[38]’ [-Warray-bounds]
127 | D->globals = gl - 10; /* Negative bias to compensate for locals. */
| ~~~^~~~
/builds/php-8.2.4/ext/opcache/jit/zend_jit_x86.dasc: In function ‘zend_jit_trace’:
/builds/php-8.2.4/ext/opcache/jit/zend_jit_x86.dasc:143:14: note: at offset -80 into object
‘dasm_labels’ of size 304
143 | static void* dasm_labels[zend_lb_MAX];
| ^~~~~~~~~~~
In file included from /builds/php-8.2.4/ext/opcache/jit/zend_jit.c:4428:
ext/opcache/jit/zend_jit_trace.c:6472:86: warning: ‘gen_handler’ may be used uninitialized
[-Wmaybe-uninitialized]
6472 | (gen_handler || !ra
|| !ra[ssa_op->op1_def]));
| ^~
ext/opcache/jit/zend_jit_trace.c:4298:30: note: ‘gen_handler’ was declared here
4298 | bool gen_handler;
| ^~~~~~~~~~~
In function ‘dasm_setupglobal’,
inlined from ‘zend_jit_trace_exit_to_vm’ at ext/opcache/jit/zend_jit_trace.c:7001:2,
inlined from ‘zend_jit_blacklist_trace_exit’ at ext/opcache/jit/zend_jit_trace.c:7721:14:
/builds/php-8.2.4/ext/opcache/jit/dynasm/dasm_x86.h:127:19: warning: array subscript -10 is outside
array bounds of ‘void *[38]’ [-Warray-bounds]
127 | D->globals = gl - 10; /* Negative bias to compensate for locals. */
| ~~~^~~~
/builds/php-8.2.4/ext/opcache/jit/zend_jit_x86.dasc: In function
‘zend_jit_blacklist_trace_exit’:
/builds/php-8.2.4/ext/opcache/jit/zend_jit_x86.dasc:143:14: note: at offset -80 into object
‘dasm_labels’ of size 304
143 | static void* dasm_labels[zend_lb_MAX];
| ^~~~~~~~~~~
In function ‘dasm_setupglobal’,
inlined from ‘zend_jit_make_stubs’ at /builds/php-8.2.4/ext/opcache/jit/zend_jit.c:4712:2,
inlined from ‘zend_jit_startup’ at /builds/php-8.2.4/ext/opcache/jit/zend_jit.c:5001:9:
/builds/php-8.2.4/ext/opcache/jit/dynasm/dasm_x86.h:127:19: warning: array subscript -10 is outside
array bounds of ‘void *[38]’ [-Warray-bounds]
127 | D->globals = gl - 10; /* Negative bias to compensate for locals. */
| ~~~^~~~
/builds/php-8.2.4/ext/opcache/jit/zend_jit_x86.dasc: In function ‘zend_jit_startup’:
/builds/php-8.2.4/ext/opcache/jit/zend_jit_x86.dasc:143:14: note: at offset -80 into object
‘dasm_labels’ of size 304
143 | static void* dasm_labels[zend_lb_MAX];
| ^~~~~~~~~~~
### PHP Version
PHP 8.2.4
### Operating System
SLES 15.4 gcc 12