Building ext/intl with `--enable-address-sanitizer --enable-undefined-sanitizer` fails to link
Personne n'a encore pris cette issue.
- Langage dominant
- C
- Étoiles
- 40.4k
- Forks
- 8.1k
- Merge moyen
- 2 j 13 h
- PR mergées (30 j)
- 96
Description
Description
The following code:
env CC=clang CXX=clang++ ./configure --disable-all --enable-intl --enable-debug --enable-zend-test --enable-address-sanitizer --enable-undefined-sanitizer
make
Resulted in this output:
/bin/bash php-src/libtool --silent --preserve-dup-deps --tag=CC --mode=compile clang -Isapi/cgi/ -Iphp-src/sapi/cgi/ -Iphp-src/main -Iphp-src -Iphp-src/ext/date/lib -Iphp-src/ext/lexbor -Iphp-src/ext/uri/uriparser/include -Iphp-src/TSRM -Iphp-src/Zend -D_GNU_SOURCE -fno-common -Wstrict-prototypes -Wformat-truncation -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -g -ffp-contract=off -fvisibility=hidden -UNDEBUG -O0 -DZEND_SIGNALS -fsanitize=address -DZEND_TRACK_ARENA_ALLOC -fsanitize=undefined -fno-sanitize-recover=undefined -fno-sanitize=object-size -fno-sanitize=function -fno-omit-frame-pointer -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c php-src/sapi/cgi/cgi_main.c -o sapi/cgi/cgi_main.lo -MMD -MF sapi/cgi/cgi_main.dep -MT sapi/cgi/cgi_main.lo
ext/opcache/jit/ir/minilua php-src/ext/opcache/jit/ir/dynasm/dynasm.lua -D X64=1 -o ext/opcache/jit/ir/ir_emit_x86.h php-src/ext/opcache/jit/ir/ir_x86.dasc
ext/opcache/jit/ir/gen_ir_fold_hash < php-src/ext/opcache/jit/ir/ir_fold.h > ext/opcache/jit/ir/ir_fold_hash.h
/bin/bash php-src/libtool --silent --preserve-dup-deps --tag=CC --mode=compile clang -Iext/opcache/ -Iphp-src/ext/opcache/ -Iphp-src/main -Iphp-src -Iphp-src/ext/date/lib -Iphp-src/ext/lexbor -Iphp-src/ext/uri/uriparser/include -Iphp-src/TSRM -Iphp-src/Zend -D_GNU_SOURCE -fno-common -Wstrict-prototypes -Wformat-truncation -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -g -ffp-contract=off -fvisibility=hidden -UNDEBUG -O0 -DZEND_SIGNALS -fsanitize=address -DZEND_TRACK_ARENA_ALLOC -fsanitize=undefined -fno-sanitize-recover=undefined -fno-sanitize=object-size -fno-sanitize=function -fno-omit-frame-pointer -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/opcache/jit/ir -DIR_TARGET_X64 -DIR_PHP -DIR_DEBUG -c php-src/ext/opcache/jit/ir/ir_emit.c -o ext/opcache/jit/ir/ir_emit.lo -MMD -MF ext/opcache/jit/ir/ir_emit.dep -MT ext/opcache/jit/ir/ir_emit.lo
/bin/bash php-src/libtool --silent --preserve-dup-deps --tag=CC --mode=compile clang -Iext/opcache/ -Iphp-src/ext/opcache/ -Iphp-src/main -Iphp-src -Iphp-src/ext/date/lib -Iphp-src/ext/lexbor -Iphp-src/ext/uri/uriparser/include -Iphp-src/TSRM -Iphp-src/Zend -D_GNU_SOURCE -fno-common -Wstrict-prototypes -Wformat-truncation -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -g -ffp-contract=off -fvisibility=hidden -UNDEBUG -O0 -DZEND_SIGNALS -fsanitize=address -DZEND_TRACK_ARENA_ALLOC -fsanitize=undefined -fno-sanitize-recover=undefined -fno-sanitize=object-size -fno-sanitize=function -fno-omit-frame-pointer -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/opcache/jit/ir -DIR_TARGET_X64 -DIR_PHP -DIR_DEBUG -c php-src/ext/opcache/jit/ir/ir.c -o ext/opcache/jit/ir/ir.lo -MMD -MF ext/opcache/jit/ir/ir.dep -MT ext/opcache/jit/ir/ir.lo
/bin/bash php-src/libtool --silent --preserve-dup-deps --tag=CC --mode=link clang -export-dynamic -fno-common -Wstrict-prototypes -Wformat-truncation -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -g -ffp-contract=off -fvisibility=hidden -UNDEBUG -O0 -DZEND_SIGNALS -fsanitize=address -DZEND_TRACK_ARENA_ALLOC -fsanitize=undefined -fno-sanitize-recover=undefined -fno-sanitize=object-size -fno-sanitize=function -fno-omit-frame-pointer -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 ext/date/php_date.o ext/date/lib/astro.o ext/date/lib/dow.o […] Zend/zend.o main/internal_functions_cli.o sapi/cli/php_cli.o sapi/cli/php_http_parser.o sapi/cli/php_cli_server.o sapi/cli/ps_title.o sapi/cli/php_cli_process_title.o -lstdc++ -lm -licuio -licui18n -licuuc -licudata -o sapi/cli/php
/bin/bash php-src/libtool --silent --preserve-dup-deps --tag=CC --mode=link clang -export-dynamic -fno-common -Wstrict-prototypes -Wformat-truncation -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -g -ffp-contract=off -fvisibility=hidden -UNDEBUG -O0 -DZEND_SIGNALS -fsanitize=address -DZEND_TRACK_ARENA_ALLOC -fsanitize=undefined -fno-sanitize-recover=undefined -fno-sanitize=object-size -fno-sanitize=function -fno-omit-frame-pointer -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 ext/date/php_date.o ext/date/lib/astro.o ext/date/lib/dow.o […] Zend/zend.o main/internal_functions_cli.o sapi/phpdbg/phpdbg_bp.o sapi/phpdbg/phpdbg_break.o sapi/phpdbg/phpdbg_btree.o sapi/phpdbg/phpdbg_cmd.o sapi/phpdbg/phpdbg_frame.o sapi/phpdbg/phpdbg_help.o sapi/phpdbg/phpdbg_info.o sapi/phpdbg/phpdbg_io.o sapi/phpdbg/phpdbg_lexer.o sapi/phpdbg/phpdbg_list.o sapi/phpdbg/phpdbg_out.o sapi/phpdbg/phpdbg_parser.o sapi/phpdbg/phpdbg_print.o sapi/phpdbg/phpdbg_prompt.o sapi/phpdbg/phpdbg_set.o sapi/phpdbg/phpdbg_sigsafe.o sapi/phpdbg/phpdbg_utils.o sapi/phpdbg/phpdbg_watch.o sapi/phpdbg/phpdbg.o -lstdc++ -lm -licuio -licui18n -licuuc -licudata -lpthread -o sapi/phpdbg/phpdbg
/bin/bash php-src/libtool --silent --preserve-dup-deps --tag=CC --mode=link clang -export-dynamic -fno-common -Wstrict-prototypes -Wformat-truncation -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -g -ffp-contract=off -fvisibility=hidden -UNDEBUG -O0 -DZEND_SIGNALS -fsanitize=address -DZEND_TRACK_ARENA_ALLOC -fsanitize=undefined -fno-sanitize-recover=undefined -fno-sanitize=object-size -fno-sanitize=function -fno-omit-frame-pointer -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 ext/date/php_date.o ext/date/lib/astro.o ext/date/lib/dow.o […] Zend/zend.o main/internal_functions_cli.o main/fastcgi.o sapi/cgi/cgi_main.o -lstdc++ -lm -licuio -licui18n -licuuc -licudata -o sapi/cgi/php-cgi
/usr/bin/ld: ext/intl/intl_convertcpp.o: in function `intl_stringFromChar(icu_74::UnicodeString&, char*, unsigned long, UErrorCode*)':
php-src/ext/intl/intl_convertcpp.cpp:28:(.text+0x23f): undefined reference to `__ubsan_vptr_type_cache'
/usr/bin/ld: php-src/ext/intl/intl_convertcpp.cpp:28:(.text+0x263): undefined reference to `__ubsan_handle_dynamic_type_cache_miss_abort'
/usr/bin/ld: php-src/ext/intl/intl_convertcpp.cpp:36:(.text+0x363): undefined reference to `__ubsan_vptr_type_cache'
/usr/bin/ld: php-src/ext/intl/intl_convertcpp.cpp:36:(.text+0x384): undefined reference to `__ubsan_handle_dynamic_type_cache_miss_abort'
/usr/bin/ld: php-src/ext/intl/intl_convertcpp.cpp:39:(.text+0x4f1): undefined reference to `__ubsan_vptr_type_cache'
/usr/bin/ld: php-src/ext/intl/intl_convertcpp.cpp:39:(.text+0x50f): undefined reference to `__ubsan_handle_dynamic_type_cache_miss_abort'
/usr/bin/ld: php-src/ext/intl/intl_convertcpp.cpp:42:(.text+0x5f8): undefined reference to `__ubsan_vptr_type_cache'
/usr/bin/ld: php-src/ext/intl/intl_convertcpp.cpp:42:(.text+0x616): undefined reference to `__ubsan_handle_dynamic_type_cache_miss_abort'
/usr/bin/ld: php-src/ext/intl/intl_convertcpp.cpp:44:(.text+0x776): undefined reference to `__ubsan_vptr_type_cache'
/usr/bin/ld: php-src/ext/intl/intl_convertcpp.cpp:44:(.text+0x794): undefined reference to `__ubsan_handle_dynamic_type_cache_miss_abort'
[3000 lines and 4 MB later]
/usr/bin/ld: php-src/ext/intl/breakiterator/codepointiterator_internal.h:86:(.text._ZN3PHP22CodePointBreakIterator16getLastCodePointEv[_ZN3PHP22CodePointBreakIterator16getLastCodePointEv]+0xc4): undefined reference to `__ubsan_handle_dynamic_type_cache_miss_abort'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:260: sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs....
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:277: sapi/phpdbg/phpdbg] Error 1
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:303: sapi/cgi/php-cgi] Error 1
But I expected this output instead:
A successful build.
PHP Version
git master @ e9e0fe45e512415c4ac44c76cc59ed03a9a01fc6
Operating System
No response
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Reproduisez le problème avec la commande configure indiquée et examinez l'échec de l'édition de liens provenant de ext/intl/intl_convertcpp.cpp et breakiterator/codepointiterator_internal.h. Comparez les options de sanitizer utilisées pour les objets C et C++ ainsi que les cibles d'édition de liens du Makefile. Le travail est terminé lorsque make s'exécute avec succès pour le build PHP configuré.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- cpp
- Domaine
- build-system, internationalization
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100