Skip to content

Commit

Permalink
Coverity per-pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
vasil-pashov committed Dec 20, 2024
1 parent 6931d3f commit 450baa0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
workflow_dispatch:
schedule:
- cron: "0 3 * * *"
pull_request:

jobs:
polaris-scan:
Expand Down
5 changes: 4 additions & 1 deletion cpp/arcticdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,10 @@ set(arcticdb_srcs
version/version_core.cpp
version/version_store_api.cpp
version/version_utils.cpp
version/version_map_batch_methods.cpp)
version/version_map_batch_methods.cpp

#================ REMOVE ME ==============
file_with_deliberate_errors.cpp)

add_library(arcticdb_core_object OBJECT ${arcticdb_srcs})

Expand Down
12 changes: 12 additions & 0 deletions cpp/arcticdb/file_with_deliberate_errors.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <vector>
#include <iostream>

void f() {
int* use_after_delete = new int(10);
delete use_after_delete;
std::cout<<*use_after_delete;

std::vector<int> use_after_move(10);
std::vector<int> moved = std::move(use_after_move);
std::cout<<use_after_move[0];
}

0 comments on commit 450baa0

Please sign in to comment.