[php-src] Issue #14243: Using `--enable-fuzzer` with `--enable-zts` cause compilation to fail

From: Date: Wed, 15 May 2024 10:28:10 +0000
Subject: [php-src] Issue #14243: Using `--enable-fuzzer` with `--enable-zts` cause compilation to fail
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-246918@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/14243 Author: Girgias ### Description I am not sure if both flags are supported together, if not it should fail at configure and not when compiling as it took me a while to figure out the issue. A simple reproducible configure command is: ``` ./configure -C CC=clang CFLAGS="-DPROFITABILITY_CHECKS=0 -DZEND_RC_DEBUG=1 -DZEND_VERIFY_FUNC_INFO=1 -DZEND_TRACK_ARENA_ALLOC=1 -ggdb3" --enable-address-sanitizer --disable-all --enable-debug --enable-zts --enable-fuzzer ``` For reference, the compilation error is as follows: ``` In file included from /home/girgias/dev/php-src/sapi/fuzzer/fuzzer-unserialize.c:22: In file included from /home/girgias/dev/php-src/main/php_main.h:22: /home/girgias/dev/php-src/main/php_globals.h:28:8: error: unknown type name 'PHPAPI' 28 | extern PHPAPI int core_globals_id; | ^ /home/girgias/dev/php-src/main/php_globals.h:29:8: error: unknown type name 'PHPAPI' 29 | extern PHPAPI size_t core_globals_offset; | ^ /home/girgias/dev/php-src/main/php_globals.h:29:21: error: expected ';' after top level declarator 29 | extern PHPAPI size_t core_globals_offset; | ^ | ; 3 errors generated. make: *** [Makefile:502: sapi/fuzzer/fuzzer-unserialize.lo] Error 1 make: *** Waiting for unfinished jobs.... In file included from /home/girgias/dev/php-src/sapi/fuzzer/fuzzer-unserializehash.c:20: In file included from /home/girgias/dev/php-src/main/php_main.h:22: /home/girgias/dev/php-src/main/php_globals.h:28:8: error: unknown type name 'PHPAPI' 28 | extern PHPAPI int core_globals_id; | ^ /home/girgias/dev/php-src/main/php_globals.h:29:8: error: unknown type name 'PHPAPI' 29 | extern PHPAPI size_t core_globals_offset; | ^ /home/girgias/dev/php-src/main/php_globals.h:29:21: error: expected ';' after top level declarator 29 | extern PHPAPI size_t core_globals_offset; | ^ | ; 3 errors generated. In file included from /home/girgias/dev/php-src/sapi/fuzzer/fuzzer-json.c:24: In file included from /home/girgias/dev/php-src/main/php_main.h:22: /home/girgias/dev/php-src/main/php_globals.h:28:8: error: unknown type name 'PHPAPI' 28 | extern PHPAPI int core_globals_id; | ^ /home/girgias/dev/php-src/main/php_globals.h:29:8: error: unknown type name 'PHPAPI' 29 | extern PHPAPI size_t core_globals_offset; | ^ /home/girgias/dev/php-src/main/php_globals.h:29:21: error: expected ';' after top level declarator 29 | extern PHPAPI size_t core_globals_offset; | ^ | ; 3 errors generated. make: *** [Makefile:508: sapi/fuzzer/fuzzer-json.lo] Error 1 ``` ### PHP Version master ### Operating System _No response_

« previous php.bugs (#246918) next »