Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package plugin-sdk-cpp for openSUSE:Factory
checked in at 2026-11-08 19:22:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/plugin-sdk-cpp (Old)
and /work/SRC/openSUSE:Factory/.plugin-sdk-cpp.new.3759290 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "plugin-sdk-cpp"
Sun Nov 8 19:22:05 2026 rev:3 rq:1396116 version:0.4.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/plugin-sdk-cpp/plugin-sdk-cpp.changes
2026-08-21 16:57:53.238682593 +0200
+++
/work/SRC/openSUSE:Factory/.plugin-sdk-cpp.new.3759290/plugin-sdk-cpp.changes
2026-11-08 19:22:30.836191916 +0100
@@ -1,0 +2,8 @@
+Tue Nov 3 18:32:07 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to version 0.4.2:
+ * Fix table iteration releasing entries the plugin never took:
+ iteration entries are no longer marked owned, matching the
+ Rust SDK and libs behaviour; adds table_test coverage
+
+-------------------------------------------------------------------
Old:
----
plugin-sdk-cpp-0.4.1.tar.gz
New:
----
plugin-sdk-cpp-0.4.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ plugin-sdk-cpp.spec ++++++
--- /var/tmp/diff_new_pack.Hab2DQ/_old 2026-11-08 19:22:32.051242180 +0100
+++ /var/tmp/diff_new_pack.Hab2DQ/_new 2026-11-08 19:22:32.053242263 +0100
@@ -17,7 +17,7 @@
Name: plugin-sdk-cpp
-Version: 0.4.1
+Version: 0.4.2
Release: 0
Summary: C++ SDK for writing Falcosecurity plugins
License: Apache-2.0
++++++ plugin-sdk-cpp-0.4.1.tar.gz -> plugin-sdk-cpp-0.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/plugin-sdk-cpp-0.4.1/.github/PULL_REQUEST_TEMPLATE.md
new/plugin-sdk-cpp-0.4.2/.github/PULL_REQUEST_TEMPLATE.md
--- old/plugin-sdk-cpp-0.4.1/.github/PULL_REQUEST_TEMPLATE.md 2026-05-04
10:51:29.000000000 +0200
+++ new/plugin-sdk-cpp-0.4.2/.github/PULL_REQUEST_TEMPLATE.md 2026-10-14
18:08:43.000000000 +0200
@@ -32,6 +32,8 @@
> /area tests
+> /area automation
+
<!--
Please remove the leading whitespace before the `/area <>` you uncommented.
-->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/plugin-sdk-cpp-0.4.1/include/falcosecurity/table.h
new/plugin-sdk-cpp-0.4.2/include/falcosecurity/table.h
--- old/plugin-sdk-cpp-0.4.1/include/falcosecurity/table.h 2026-05-04
10:51:29.000000000 +0200
+++ new/plugin-sdk-cpp-0.4.2/include/falcosecurity/table.h 2026-10-14
18:08:43.000000000 +0200
@@ -167,6 +167,7 @@
m_entry = o.m_entry;
m_table = o.m_table;
m_reader = o.m_reader;
+ m_owned = o.m_owned;
o.m_entry = nullptr;
};
FALCOSECURITY_INLINE
@@ -176,6 +177,7 @@
m_entry = o.m_entry;
m_table = o.m_table;
m_reader = o.m_reader;
+ m_owned = o.m_owned;
o.m_entry = nullptr;
return *this;
};
@@ -205,7 +207,7 @@
FALCOSECURITY_INLINE
void release_entry()
{
- if(m_entry && m_reader->m_reader)
+ if(m_owned && m_entry && m_reader->m_reader)
{
m_reader->m_reader->release_table_entry(m_table, m_entry);
m_entry = nullptr;
@@ -215,6 +217,9 @@
_internal::ss_plugin_table_entry_t* m_entry;
_internal::ss_plugin_table_t* m_table;
const table_reader* m_reader;
+ // false for entries borrowed from the table (iteration): they must not
+ // be released.
+ bool m_owned = true;
friend class table;
friend class table_field;
@@ -696,6 +701,7 @@
{
table_iterator_state_t* state =
static_cast<table_iterator_state_t*>(s);
table_entry entry(e, state->table, state->reader);
+ entry.m_owned = false;
return state->func(entry) ? 1 : 0;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/plugin-sdk-cpp-0.4.1/tests/CMakeLists.txt
new/plugin-sdk-cpp-0.4.2/tests/CMakeLists.txt
--- old/plugin-sdk-cpp-0.4.1/tests/CMakeLists.txt 2026-05-04
10:51:29.000000000 +0200
+++ new/plugin-sdk-cpp-0.4.2/tests/CMakeLists.txt 2026-10-14
18:08:43.000000000 +0200
@@ -37,5 +37,13 @@
GTest::gtest_main
)
+# Table test
+add_executable(table_test table_test.cpp)
+target_link_libraries(table_test PRIVATE
+ plugin-sdk-cpp
+ GTest::gtest_main
+)
+
# Discover tests
gtest_discover_tests(codec_test)
+gtest_discover_tests(table_test)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/plugin-sdk-cpp-0.4.1/tests/table_test.cpp
new/plugin-sdk-cpp-0.4.2/tests/table_test.cpp
--- old/plugin-sdk-cpp-0.4.1/tests/table_test.cpp 1970-01-01
01:00:00.000000000 +0100
+++ new/plugin-sdk-cpp-0.4.2/tests/table_test.cpp 2026-10-14
18:08:43.000000000 +0200
@@ -0,0 +1,98 @@
+// SPDX-License-Identifier: Apache-2.0
+//
+// Copyright (C) 2026 The Falco Authors.
+//
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <falcosecurity/table.h>
+
+#include <gtest/gtest.h>
+
+using namespace falcosecurity;
+
+namespace
+{
+int g_entry;
+int g_released;
+
+_internal::ss_plugin_table_entry_t*
+fake_get(_internal::ss_plugin_table_t*, const _internal::ss_plugin_state_data*)
+{
+ return &g_entry;
+}
+
+void fake_release(_internal::ss_plugin_table_t*,
+ _internal::ss_plugin_table_entry_t*)
+{
+ g_released++;
+}
+
+_internal::ss_plugin_bool
+fake_iterate(_internal::ss_plugin_table_t*,
+ _internal::ss_plugin_table_iterator_func_t it,
+ _internal::ss_plugin_table_iterator_state_t* s)
+{
+ it(s, &g_entry);
+ it(s, &g_entry);
+ return 1;
+}
+
+class table_test : public ::testing::Test
+{
+ protected:
+ void SetUp() override
+ {
+ g_released = 0;
+ m_vtable = {};
+ m_vtable.get_table_entry = fake_get;
+ m_vtable.release_table_entry = fake_release;
+ m_vtable.iterate_entries = fake_iterate;
+ }
+
+ _internal::ss_plugin_table_reader_vtable_ext m_vtable;
+ int m_table_handle = 0;
+};
+} // namespace
+
+TEST_F(table_test, iteration_does_not_release_borrowed_entries)
+{
+ table_reader reader(&m_vtable, nullptr, nullptr);
+ table t("t", _internal::SS_PLUGIN_ST_INT64, &m_table_handle);
+
+ int visited = 0;
+ t.iterate_entries(reader,
+ [&](const table_entry&)
+ {
+ visited++;
+ return true;
+ });
+
+ EXPECT_EQ(visited, 2);
+ EXPECT_EQ(g_released, 0);
+}
+
+TEST_F(table_test, entry_from_get_is_released_once)
+{
+ table_reader reader(&m_vtable, nullptr, nullptr);
+ table t("t", _internal::SS_PLUGIN_ST_INT64, &m_table_handle);
+
+ {
+ auto e = t.get_entry(reader, int64_t(1));
+ auto moved = std::move(e);
+ EXPECT_EQ(g_released, 0);
+ }
+
+ EXPECT_EQ(g_released, 1);
+}