Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dangling pointer and mixed-signedness warning #2223

Conversation

federico-sysdig
Copy link
Contributor

What type of PR is this?
/kind cleanup

Any specific area of the project related to this PR?
/area build
/area tests

Does this PR require a change in the driver versions?
No

What this PR does / why we need it:
Fixes an error when taking the address of a temporary string and a warning about mixed sign integer comparison with clang 18.

Which issue(s) this PR fixes:
None

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Copy link

github-actions bot commented Jan 6, 2025

Perf diff from master - unit tests

     9.97%     +3.25%  [.] sinsp_parser::reset
     2.82%     +3.02%  [.] sinsp_parser::process_event
    11.00%     -1.44%  [.] sinsp::next
     4.15%     -0.76%  [.] sinsp_evt::load_params
     1.98%     +0.50%  [.] is_conversion_needed
     1.40%     -0.46%  [.] sinsp_parser::event_cleanup
     4.16%     -0.45%  [.] gzfile_read
     8.03%     -0.44%  [.] sinsp_evt::get_type
     3.74%     +0.30%  [.] sinsp_thread_manager::find_thread
     0.69%     -0.27%  [.] scap_event_has_large_payload

Heap diff from master - unit tests

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

Heap diff from master - scap file

peak heap memory consumption: 0B
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.0343         +0.0343           144           149           144           149
BM_sinsp_split_median                                          +0.0353         +0.0353           144           149           144           149
BM_sinsp_split_stddev                                          -0.4993         -0.4996             1             1             1             1
BM_sinsp_split_cv                                              -0.5159         -0.5161             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0694         -0.0694            61            56            61            56
BM_sinsp_concatenate_paths_relative_path_median                -0.0685         -0.0685            61            56            61            56
BM_sinsp_concatenate_paths_relative_path_stddev                -0.7131         -0.7129             1             0             1             0
BM_sinsp_concatenate_paths_relative_path_cv                    -0.6917         -0.6915             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0161         +0.0161            23            24            23            24
BM_sinsp_concatenate_paths_empty_path_median                   +0.0156         +0.0156            23            24            23            24
BM_sinsp_concatenate_paths_empty_path_stddev                   -0.1503         -0.1483             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       -0.1638         -0.1619             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.1251         -0.1251            65            56            65            56
BM_sinsp_concatenate_paths_absolute_path_median                -0.1211         -0.1211            64            57            64            57
BM_sinsp_concatenate_paths_absolute_path_stddev                +1.7125         +1.7090             0             1             0             1
BM_sinsp_concatenate_paths_absolute_path_cv                    +2.1003         +2.0963             0             0             0             0
BM_sinsp_split_container_image_mean                            -0.0051         -0.0051           391           389           391           389
BM_sinsp_split_container_image_median                          -0.0091         -0.0091           392           388           392           388
BM_sinsp_split_container_image_stddev                          -0.1560         -0.1574             3             2             3             2
BM_sinsp_split_container_image_cv                              -0.1516         -0.1530             0             0             0             0

Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.44%. Comparing base (d1881b4) to head (fdbf6be).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2223   +/-   ##
=======================================
  Coverage   75.44%   75.44%           
=======================================
  Files         265      265           
  Lines       34057    34057           
  Branches     5801     5801           
=======================================
+ Hits        25694    25695    +1     
+ Misses       8363     8362    -1     
Flag Coverage Δ
libsinsp 75.44% <ø> (+<0.01%) ⬆️

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.

Copy link
Member

@Andreagit97 Andreagit97 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
Contributor

poiana commented Jan 7, 2025

LGTM label has been added.

Git tree hash: e7723b39ac4ac62e3a83c282ce0656d8e995a053

@poiana poiana added the approved label Jan 7, 2025
@Andreagit97 Andreagit97 added this to the 0.20.0 milestone Jan 7, 2025
Copy link
Contributor

@FedeDP FedeDP 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
Contributor

poiana commented Jan 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP, federico-sysdig

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

The pull request process is described here

Needs approval from an approver in each of these files:

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 63f9cfb into falcosecurity:master Jan 7, 2025
49 checks passed
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.

4 participants