php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77445 Link-Time-Optimizations fail if GCC global registers are used
Submitted: 2019-01-11 11:03 UTC Modified: 2020-04-16 10:44 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: dpa-bugs at aegee dot org Assigned:
Status: Open Package: *General Issues
PHP Version: 7.1.26 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dpa-bugs at aegee dot org
New email:
PHP Version: OS:

 

 [2019-01-11 11:03 UTC] dpa-bugs at aegee dot org
Description:
------------
With gcc 8.2.1 -flto build fails:

/usr/local/lib/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /src/mail/imap-2007f//lib/libc-client.a(osdep.o): in function `ssl_onceonlyinit':
/src/mail/imap-2007f/c-client/osdep.c:302: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/src/http/php-7.1.26/Zend/zend_vm_execute.h: In function 'ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER':
/src/http/php-7.1.26/Zend/zend_vm_execute.h:326:38: error: global register variable follows a function definition
 register zend_execute_data* volatile execute_data __asm__(ZEND_VM_FP_GLOBAL_REG);
                                      ^
/src/http/php-7.1.26/Zend/zend_vm_execute.h:332:34: error: global register variable follows a function definition
 register const zend_op* volatile opline __asm__(ZEND_VM_IP_GLOBAL_REG);
                                  ^
/src/http/php-7.1.26/ext/readline/readline_cli.c: In function 'cli_completion_generator_ht.constprop':
/src/http/php-7.1.26/ext/readline/readline_cli.c:408:15: warning: 'name' may be used uninitialized in this function [-Wmaybe-uninitialized]
  zend_string *name;
               ^
/src/http/php-7.1.26/sapi/cli/php_cli_server.c: In function 'php_cli_server_client_read_request_on_path':
/src/http/php-7.1.26/sapi/cli/php_cli_server.c:1571:29: warning: 'vpath_len' may be used uninitialized in this function [-Wmaybe-uninitialized]
   client->request.vpath_len = vpath_len;
                             ^
/src/http/php-7.1.26/sapi/cli/php_cli_server.c:1568:10: note: 'vpath_len' was declared here
   size_t vpath_len;
          ^
/src/http/php-7.1.26/Zend/zend_execute.c: In function 'zend_check_arg_type':
/src/http/php-7.1.26/Zend/zend_execute.c:959:3: warning: 'ce' may be used uninitialized in this function [-Wmaybe-uninitialized]
   zend_verify_arg_error(zf, cur_arg_info, arg_num, ce, arg);
   ^
/src/http/php-7.1.26/Zend/zend_execute.c:948:20: note: 'ce' was declared here
  zend_class_entry *ce;
                    ^
lto-wrapper: fatal error: cc returned 1 exit status
compilation terminated.
/usr/local/lib/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [Makefile:300: sapi/cli/php] Error 1


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-11 11:05 UTC] nikic@php.net
You need to build with --disable-gcc-global-regs.
 [2019-01-11 11:08 UTC] spam2 at rhsoft dot net
it's a long known problem that you can't use LTO until you use --disable-gcc-global-regs which is really sad because the best performance would be --enable-gcc-global-regs + LTO + PGO
 [2019-01-11 23:49 UTC] a at b dot c dot de
See also bug #77318
 [2020-04-16 10:44 UTC] nikic@php.net
-Summary: Link-Time-Optimizations fail +Summary: Link-Time-Optimizations fail if GCC global registers are used
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 02:01:28 2024 UTC