Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

При попытке направить FUTAG на расширение для Postgres получаю следующие ошибки #72

Open
CourteousSleet opened this issue May 2, 2023 · 8 comments

Comments

@CourteousSleet
Copy link

cc1: error: ‘-Werror=unguarded-availability-new’: no option ‘-Wunguarded-availability-new’
cc1: error: ‘-Werror=unguarded-availability-new’: no option ‘-Wunguarded-availability-new’
cc1: note: unrecognized command-line option ‘-Wno-compound-token-split-by-macro’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-unused-command-line-argument’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-compound-token-split-by-macro’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-unused-command-line-argument’ may have been intended to silence earlier diagnostics
cc1: error: ‘-Werror=unguarded-availability-new’: no option ‘-Wunguarded-availability-new’
cc1: note: unrecognized command-line option ‘-Wno-compound-token-split-by-macro’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-unused-command-line-argument’ may have been intended to silence earlier diagnostics
make: *** [<builtin>: src/utils/logger.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [<builtin>: src/utils/pgut.o] Error 1
cc1: error: ‘-Werror=unguarded-availability-new’: no option ‘-Wunguarded-availability-new’
cc1: note: unrecognized command-line option ‘-Wno-compound-token-split-by-macro’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-unused-command-line-argument’ may have been intended to silence earlier diagnostics
make: *** [<builtin>: src/utils/parray.o] Error 1
make: *** [<builtin>: src/utils/thread.o] Error 1
cc1: error: ‘-Werror=unguarded-availability-new’: no option ‘-Wunguarded-availability-new’
cc1: error: ‘-Werror=unguarded-availability-new’: no option ‘-Wunguarded-availability-new’
cc1: note: unrecognized command-line option ‘-Wno-compound-token-split-by-macro’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-unused-command-line-argument’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-compound-token-split-by-macro’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-unused-command-line-argument’ may have been intended to silence earlier diagnostics
make: *** [<builtin>: src/utils/json.o] Error 1
make: *** [<builtin>: src/utils/configuration.o] Error 1
cc1: error: ‘-Werror=unguarded-availability-new’: no option ‘-Wunguarded-availability-new’
cc1: note: unrecognized command-line option ‘-Wno-compound-token-split-by-macro’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-unused-command-line-argument’ may have been intended to silence earlier diagnostics
make: *** [<builtin>: src/utils/remote.o] Error 1
cc1: error: ‘-Werror=unguarded-availability-new’: no option ‘-Wunguarded-availability-new’
cc1: note: unrecognized command-line option ‘-Wno-compound-token-split-by-macro’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-unused-command-line-argument’ may have been intended to silence earlier diagnostics
make: *** [<builtin>: src/utils/file.o] Error 1
@CourteousSleet
Copy link
Author

CourteousSleet commented Jun 22, 2023

При запуске futag над pg_probackup не срабатывает сборка. Прикрепляю также выводы сборки с футагом и без.
no_futag.txt
futag.txt

@CourteousSleet
Copy link
Author

@thientc

@thientc thientc reopened this Jul 8, 2023
@CourteousSleet
Copy link
Author

Нет ли новостей по этой задаче? @thientc

@thientc
Copy link
Collaborator

thientc commented Sep 11, 2023

Сейчас посмотрю.

@CourteousSleet
Copy link
Author

Попробовал я собирать это расширение вместо скрипта так как указано здесь:

$ /path/to/futag-llvm/package/bin/scan-build -enable-checker futag.FutagFunctionAnalyzer -analyzer-config futag.FutagFunctionAnalyzer:report_dir=/path/to/analysis/folder <your-build-script>

Сборка хотя бы начинается, но получаю всё равно пустой futag-analysis-result.json:

scan-build: Analysis run complete.
scan-build: 0 bugs found.
scan-build: The analyzer encountered problems on some source files.
scan-build: Preprocessed versions of these sources were deposited in '/tmp/scan-build-2023-11-08-115543-54899-1/failures'.
scan-build: Please consider submitting a bug report using these files:
python analyze.py 

 -- [Futag]: Analysing fuction declarations...
 -- [Futag]: Analysing contexts...

 -- [Futag]: Analysing data types ...

 -- [Futag]: Analysing header files and compiler options...
Total functions:  0
Total functions for consumer programs:  0
Total enums:  0
Total records:  0
Total typedefs:  0
Analysis result:  /home/user/Fuzzing/Extensions/pg_probackup/.futag-analysis/futag-analysis-result.json
error: no analyzer checkers or packages are associated with 'futag.FutagFunctionAnalyzer'
note: use -analyzer-disable-all-checks to disable all static analyzer checkers
1 error generated.

@thientc
Copy link
Collaborator

thientc commented Nov 14, 2023

error: no analyzer checkers or packages are associated with 'futag.FutagFunctionAnalyzer'
note: use -analyzer-disable-all-checks to disable all static analyzer checkers
1 error generated.

Здесь написано, что нет такого чекера futag.FutagFunctionAnalyzer.
Проверьте перечень чекеров командой:
futag-llvm/bin/scan-build
image

@CourteousSleet
Copy link
Author

Их я тоже все попробовал и вещде вывод

error: no analyzer checkers or packages are associated with 'futag.FutagAnalyzer'
note: use -analyzer-disable-all-checks to disable all static analyzer checkers
1 error generated.

@CourteousSleet
Copy link
Author

Если вдруг у вас появится возможность, то вот ссылка на расширение: https://github.com/postgrespro/pg_probackup
Сначала потребуется собрать и установить PostgreSQL, а далее через эту команду можно собрать расширение:

make USE_PGXS=1 PG_CONFIG=PG_BIN/bin/pg_config top_srcdir=postgres,

где PG_BIN -- prefix для configure скрипта.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants