Merge branch 'ncurses_format' of cgzones/htop

This commit is contained in:
Daniel Lange 2021-01-08 17:31:06 +01:00
commit c7d93a8f30
2 changed files with 20 additions and 3 deletions

View File

@ -2,6 +2,11 @@ name: CI
on: [ push, pull_request ] on: [ push, pull_request ]
env:
# Enable format attributes in ncurses headers
# Enable fortified memory/string handling
CPPFLAGS: -DGCC_PRINTF -DGCC_SCANF -D_FORTIFY_SOURCE=2
jobs: jobs:
build-ubuntu-latest-minimal-gcc: build-ubuntu-latest-minimal-gcc:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -47,6 +52,10 @@ jobs:
build-ubuntu-latest-full-featured-gcc: build-ubuntu-latest-full-featured-gcc:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Enable LTO, might trigger additional warnings on advanced inlining
env:
CFLAGS: -O3 -g -flto
LDFLAGS: -O3 -g -flto
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install Dependencies - name: Install Dependencies

14
CRT.c
View File

@ -818,9 +818,13 @@ void CRT_handleSIGSEGV(int signal) {
"- Your OS and kernel version (uname -a)\n" "- Your OS and kernel version (uname -a)\n"
"- Your distribution and release (lsb_release -a)\n" "- Your distribution and release (lsb_release -a)\n"
"- Likely steps to reproduce (How did it happened?)\n" "- Likely steps to reproduce (How did it happened?)\n"
);
#ifdef HAVE_EXECINFO_H #ifdef HAVE_EXECINFO_H
"- Backtrace of the issue (see below)\n" fprintf(stderr, "- Backtrace of the issue (see below)\n");
#endif #endif
fprintf(stderr,
"\n" "\n"
); );
@ -855,11 +859,15 @@ void CRT_handleSIGSEGV(int signal) {
"you should provide a disassembly of your binary.\n" "you should provide a disassembly of your binary.\n"
"This can usually be done by running the following command:\n" "This can usually be done by running the following command:\n"
"\n" "\n"
);
#ifdef HTOP_DARWIN #ifdef HTOP_DARWIN
" otool -tvV `which htop` > ~/htop.otool\n" fprintf(stderr, " otool -tvV `which htop` > ~/htop.otool\n");
#else #else
" objdump -d -S -w `which htop` > ~/htop.objdump\n" fprintf(stderr, " objdump -d -S -w `which htop` > ~/htop.objdump\n");
#endif #endif
fprintf(stderr,
"\n" "\n"
"Please include the generated file in your report.\n" "Please include the generated file in your report.\n"
"\n" "\n"