php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77677 FPM fails to build on AIX due to missing WCOREDUMP
Submitted: 2019-02-28 03:46 UTC Modified: -
From: kadler at us dot ibm dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 7.3.2 OS: AIX
Private report: No CVE-ID: None
 [2019-02-28 03:46 UTC] kadler at us dot ibm dot com
Description:
------------
WCOREDUMP is actually a macro on Linux and other systems, but since it was undefined at compile time the compiler implicitly defined it:

/QOpenSys/home/rpmbuild/rpmbuild/BUILD/php-7.3.1/sapi/fpm/fpm/fpm_children.c:210:28: warning: implicit declaration of function 'WCOREDUMP' [-Wimplicit-function-declaration]
    const char *have_core = WCOREDUMP(status) ? " - core dumped" : "";
                            ^~~~~~~~~

This leads to an eventual linker error due to the missing symbol:

ld: 0711-317 ERROR: Undefined symbol: .WCOREDUMP
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

According to the Linux man page, WCOREDUMP should be gated by an #ifdef

WCOREDUMP(status)
    returns true if the child produced a core dump. This macro should only be employed if WIFSIGNALED returned true. This macro is not specified in POSIX.1-2001 and is not available on some UNIX implementations (e.g., AIX, SunOS). Only use this enclosed in #ifdef WCOREDUMP ... #endif


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-28 03:51 UTC]
The following pull request has been associated:

Patch Name: Fix bug #77677: WCOREDUMP not available on all systems
On GitHub:  https://github.com/php/php-src/pull/3897
Patch:      https://github.com/php/php-src/pull/3897.patch
 [2019-03-01 13:52 UTC] nikic@php.net
Automatic comment on behalf of kadler@us.ibm.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=006355c9fa0d1cd8aef86a97c162053e7d2d896e
Log: Fix bug #77677: WCOREDUMP not available on all systems
 [2019-03-01 13:52 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Sep 20 11:01:26 2019 UTC