Skip to content

fix(libsinsp): arg index default value = -1#2774

Merged
poiana merged 1 commit intofalcosecurity:masterfrom
therealbobo:fix-arg-index-plugin-filtercheck
Jan 8, 2026
Merged

fix(libsinsp): arg index default value = -1#2774
poiana merged 1 commit intofalcosecurity:masterfrom
therealbobo:fix-arg-index-plugin-filtercheck

Conversation

@therealbobo
Copy link
Copy Markdown
Contributor

@therealbobo therealbobo commented Jan 8, 2026

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind test

/kind feature

/kind sync

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:

arg_index = 0 is ambiguous and some plugin treat it (e.g. the container plugin) as valid but it's not always true. In particular if a plugin field is a list, if it is used without the index it will always print the first element.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 8, 2026

Perf diff from master - unit tests

     9.84%    +13.04%  [.] std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_lock_nothrow()
    13.60%     -9.40%  [.] std::__shared_count<(__gnu_cxx::_Lock_policy)2>::_M_get_use_count() const
     9.84%     -4.66%  [.] sinsp_threadinfo::update_main_fdtable()
     8.57%     +2.24%  [.] sinsp_threadinfo::get_fd_table()
    15.44%     -1.94%  [.] std::__shared_ptr<sinsp_threadinfo, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__weak_ptr<sinsp_threadinfo, (__gnu_cxx::_Lock_policy)2> const&, std::nothrow_t)
    11.90%     -1.07%  [.] sinsp_threadinfo::get_main_thread()
     3.21%     +1.01%  [.] sinsp_thread_manager::create_thread_dependencies(std::shared_ptr<sinsp_threadinfo> const&)
     9.03%     +0.64%  [.] std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release()
     4.62%     +0.28%  [.] thread_group_info::get_first_thread() const
     0.33%     -0.12%  [.] scap_event_encode_params_v

Heap diff from master - unit tests

peak heap memory consumption: -4B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

peak heap memory consumption: -2B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Benchmarks diff from master

Comparing gbench_data.json to /root/actions-runner/_work/libs/libs/build/gbench_data.json
Benchmark                                                         Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------
BM_sinsp_split_mean                                            +0.0057         +0.0055           243           244           243           244
BM_sinsp_split_median                                          +0.0023         +0.0018           244           244           244           244
BM_sinsp_split_stddev                                          -0.0938         -0.1106             2             2             2             2
BM_sinsp_split_cv                                              -0.0990         -0.1155             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0287         -0.0285            70            68            70            68
BM_sinsp_concatenate_paths_relative_path_median                -0.0263         -0.0265            70            68            70            68
BM_sinsp_concatenate_paths_relative_path_stddev                -0.4647         -0.4724             1             1             1             1
BM_sinsp_concatenate_paths_relative_path_cv                    -0.4489         -0.4569             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0067         -0.0066            40            40            40            40
BM_sinsp_concatenate_paths_empty_path_median                   +0.0000         -0.0000            40            40            40            40
BM_sinsp_concatenate_paths_empty_path_stddev                   -0.8188         -0.8204             1             0             1             0
BM_sinsp_concatenate_paths_empty_path_cv                       -0.8176         -0.8192             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.0047         -0.0048            69            68            69            68
BM_sinsp_concatenate_paths_absolute_path_median                -0.0044         -0.0046            69            68            69            68
BM_sinsp_concatenate_paths_absolute_path_stddev                +1.6332         +1.6398             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_cv                    +1.6456         +1.6524             0             0             0             0

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.54%. Comparing base (60a9560) to head (0b2e71b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2774   +/-   ##
=======================================
  Coverage   74.54%   74.54%           
=======================================
  Files         292      292           
  Lines       30042    30042           
  Branches     4665     4665           
=======================================
  Hits        22395    22395           
  Misses       7647     7647           
Flag Coverage Δ
libsinsp 74.54% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ekoops ekoops added this to the 0.24.0 milestone Jan 8, 2026
Copy link
Copy Markdown
Contributor

@ekoops ekoops left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Copy Markdown
Contributor

poiana commented Jan 8, 2026

LGTM label has been added.

DetailsGit tree hash: 2bd2e062662db5cf321e400d5bd729a54767a506

@poiana poiana added the approved label Jan 8, 2026
Copy link
Copy Markdown
Member

@deepskyblue86 deepskyblue86 left a comment

Choose a reason for hiding this comment

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

/approve

@github-project-automation github-project-automation bot moved this from Todo to In progress in Falco Roadmap Jan 8, 2026
@poiana
Copy link
Copy Markdown
Contributor

poiana commented Jan 8, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deepskyblue86, ekoops, therealbobo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [deepskyblue86,ekoops]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 32f824c into falcosecurity:master Jan 8, 2026
47 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Falco Roadmap Jan 8, 2026
@ekoops ekoops modified the milestones: 0.24.0, 0.23.1 Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants