Skip to content

Commit

Permalink
fixup: wonder if this will fix it...
Browse files Browse the repository at this point in the history
  • Loading branch information
kgiusti committed Oct 12, 2023
1 parent 5096c4d commit c888ac1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang-analyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
run: |
sudo pip3 install codechecker
# disable IPO to make compilation faster
cmake -S . -B build -DBUILD_TESTING=OFF -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF -DQD_ENABLE_ASSERTIONS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake -S . -B build -DBUILD_TESTING=OFF -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF -DQD_ENABLE_ASSERTIONS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_WARNING_ERROR=OFF
# perform build so that generated sources get generated
cmake --build build
CodeChecker analyze build/compile_commands.json -o ./reports
Expand Down
6 changes: 4 additions & 2 deletions src/router_core/modules/test_hooks/core_test_hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,14 +765,16 @@ static void _handle_crash_request(qdr_core_t *core, qd_message_t *message)
while (true) {
// tell the code analyzer that it should mind its own business...
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
#pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak"
#pragma GCC diagnostic ignored "-Wanalyzer-possible-null-dereference"
#if __GNUC__ > 12
#pragma GCC diagnostic ignored "-Wanalyzer-out-of-bounds"
#endif
// NOLINTBEGIN
volatile unsigned long *ptr = (unsigned long *) qd_malloc(sizeof(unsigned long));
for (int k = 0; k < 2 * 1024 * 1024; k++)
*ptr++ = ~0UL;
// NOLINTEND
#pragma GCC diagnostic pop
sched_yield(); // let other threads try to malloc...
}
Expand Down

0 comments on commit c888ac1

Please sign in to comment.