Skip to content

Upgrade build to C++20, C17, and Boost 1.91#8870

Draft
zwass wants to merge 75 commits into
osquery:masterfrom
zwass:upgrade-c-cpp
Draft

Upgrade build to C++20, C17, and Boost 1.91#8870
zwass wants to merge 75 commits into
osquery:masterfrom
zwass:upgrade-c-cpp

Conversation

@zwass
Copy link
Copy Markdown
Member

@zwass zwass commented May 1, 2026

  • Increase minimum Windows version to 10
  • Increase minimum macOS version to 13.3

Copilot AI review requested due to automatic review settings May 7, 2026 19:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 56 changed files in this pull request and generated 11 comments.

Comment thread tests/integration/tables/process_open_pipes.cpp
Comment on lines +193 to +213
@@ -188,11 +199,21 @@ class ProcessOpenPipesTest : public testing::Test {

int reader_pid = create_child("reader");
if (reader_pid <= 0) {
LOG(ERROR) << "Error creating writer child";
LOG(ERROR) << "Error creating reader child";
kill_children(writer_pid, reader_pid);
return;
}

const bool writer_ready = wait_child_signal();
const bool reader_ready = wait_child_signal();

if (!writer_ready || !reader_ready) {
kill_children(writer_pid, reader_pid);
FAIL()
<< "One or more child processes failed to initialize the test pipe";
Comment thread osquery/utils/pidfile/tests/pidfile.cpp Outdated
Comment thread plugins/config/filesystem_config.cpp
Comment thread osquery/utils/aws/aws_util.cpp
Comment thread osquery/tables/applications/chrome/utils.cpp Outdated
Comment thread osquery/tables/applications/chrome/utils.cpp Outdated
Comment thread osquery/database/database.cpp Outdated
Comment thread osquery/events/windows/windowseventlogparser.cpp Outdated
Comment on lines +12 to +17
execute_process(
COMMAND git submodule update --init -- libs/static_string
WORKING_DIRECTORY "${BOOST_ROOT}"
OUTPUT_QUIET
ERROR_QUIET
)
Copilot AI review requested due to automatic review settings May 8, 2026 16:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 55 out of 57 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

osquery/utils/pidfile/tests/pidfile.cpp:52

  • The new move constructor/assignment leaves the moved-from object with an empty path, but the destructor unconditionally calls boost::filesystem::remove(path). If a moved-from UniquePath is destroyed, this may attempt to remove an empty path and can throw from a destructor (potentially terminating the test process). Consider clearing/invalidating other.path explicitly in the move operations and guarding in the destructor (e.g., only remove when !path.empty() and/or use the remove overload that takes an error_code).

Comment on lines +12 to +17
execute_process(
COMMAND git submodule update --init -- libs/static_string
WORKING_DIRECTORY "${BOOST_ROOT}"
OUTPUT_QUIET
ERROR_QUIET
)
Comment thread libraries/cmake/source/aws-sdk-cpp/CMakeLists.txt Outdated
Comment thread osquery/remote/http_client.h
Copilot AI review requested due to automatic review settings May 12, 2026 16:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 56 changed files in this pull request and generated 4 comments.

Comment on lines +207 to +209
// Parent only reads, close the write end.
close(fd_signal_[1]);

Comment thread osquery/tables/system/tests/windows/registry_tests.cpp
Comment thread cmake/flags.cmake
Comment on lines +4 to +5
set(CMAKE_C_STANDARD 17)
set(CMAKE_C_STANDARD_REQUIRED ON)
Comment thread CMakeLists.txt
Comment on lines +56 to +57
# Set the minimum macOS deployment target to 13.3
set(CMAKE_OSX_DEPLOYMENT_TARGET "13.3" CACHE STRING "Minimum macOS deployment version")
Copilot AI review requested due to automatic review settings May 12, 2026 18:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 56 changed files in this pull request and generated 5 comments.

Comment on lines 71 to 77
if (test_type_ == "named_pipe") {
int fd = open(pipe_path_.c_str(), O_WRONLY);
if (fd == -1) {
LOG(ERROR) << "Error in opening named pipe";
LOG(ERROR) << "Writer: Error opening named pipe";
signal_parent(false);
return;
}
Comment on lines 87 to 96
if (test_type_ == "named_pipe") {
int fd = open(pipe_path_.c_str(), O_RDONLY);
if (fd == -1) {
LOG(ERROR) << "Error in opening named pipe";
LOG(ERROR) << "Reader: Error opening named pipe";
signal_parent(false);
return;
}
return fd;
} else { // unnamed_pipe
} else { // unnamed_pipe, close write end
close(fd_[1]);
return fd_[0];
}
}

void do_writer() {
std::string buf = "test";

int fd = setup_writer();
if (fd == -1) {
signal_parent();
return;
}

if (write(fd, buf.c_str(), buf.length()) == -1) {
signal_parent();
return;
}

runForever();
}

void do_reader() {
std::array<char, 10> buf;

int fd = setup_reader();
if (fd == -1) {
signal_parent();
return;
}

if (read(fd, buf.data(), 10) == -1) {
signal_parent();
return;
}
Comment thread osquery/tables/system/tests/windows/registry_tests.cpp
Comment thread osquery/events/windows/windowseventlogparser.cpp Outdated
Comment thread osquery/utils/pidfile/pidfile_posix.cpp Outdated
Copilot AI review requested due to automatic review settings May 12, 2026 19:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 53 out of 55 changed files in this pull request and generated 1 comment.

Comment on lines +218 to 226
TEST_F(ProcessOpenPipesTest, test_named_pipe) {
test_named_pipe();
ASSERT_GT(test_result_, 0);
}

TEST_F(ProcessOpenPipesTest, test_unnamed_pipe) {
test_unnamed_pipe();
ASSERT_GT(test_result_, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants