Summary: | ASTERISK-28622: Differences in gcc options cause the undefined sanitizer to fail in pjproject when using dev-mode | ||
Reporter: | George Joseph (gjoseph) | Labels: | |
Date Opened: | 2019-11-19 10:58:46.000-0600 | Date Closed: | |
Priority: | Minor | Regression? | |
Status: | Open/New | Components: | Core/BuildSystem |
Versions: | 13.29.1 16.6.1 17.0.0 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Gcc 9.2.1 | Attachments: | |
Description: | Discovered by [~seanbright]
When using dev-mode and the Undefined sanitizer, pjproject fails to link the pjsua app and spits out thousands of errors in the libraries. When using the Undefined sanitizer _without_ dev-mode, it works fine. This may be due to the different options passed to the pjproject Makefile. For reference here are 2 examples of the command lines. We should probably do an audit on the options anyway, many of the options get passed to gcc multiple times. With dev-mode: {noformat} gcc -c -Wall -DPJ_AUTOCONF=1 -pthread -pipe -g3 -fno-omit-frame-pointer -fsanitize=undefined -O3 -fno-partial-inlining -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1 -fPIC -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-label -Wno-unused-function -Wno-strict-aliasing -pthread -pipe -g3 -fno-omit-frame-pointer -fsanitize=undefined -O3 -fno-partial-inlining -fPIC -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-label -Wno-unused-function -Wno-strict-aliasing -I../include -I../../pjlib/include -I../../pjlib-util/include -I../../pjnath/include -I../../pjmedia/include \ -o output/pjsua-lib-x86_64-unknown-linux-gnu/pjsua_im.o \ ../src/pjsua-lib/pjsua_im.c {noformat} Without dev-mode {noformat} gcc -c -Wall -DPJ_AUTOCONF=1 -fPIC -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-label -Wno-unused-function -Wno-strict-aliasing -pthread -pipe -g3 -fno-omit-frame-pointer -fsanitize=undefined -O3 -fno-partial-inlining -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1 -fPIC -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-label -Wno-unused-function -Wno-strict-aliasing -pthread -pipe -g3 -fno-omit-frame-pointer -fsanitize=undefined -O3 -fno-partial-inlining -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-label -Wno-unused-function -Wno-strict-aliasing -I../include -I../../pjlib/include -I../../pjlib-util/include -I../../pjnath/include -I../../pjmedia/include \ -o output/pjsua-lib-x86_64-unknown-linux-gnu/pjsua_im.o \ ../src/pjsua-lib/pjsua_im.c {noformat} | ||
Comments: | By: Sean Bright (seanbright) 2020-02-10 15:46:04.457-0600 Not able to get any of the sanitizers to build in dev-mode. We should probably just remove them as they are not supported. |