fix(driver): use correct syntax for flexible array member#2760
fix(driver): use correct syntax for flexible array member#2760irozzo-1A merged 1 commit intofalcosecurity:masterfrom
Conversation
UBSAN (Undefined Behaviour Sanitizer) performs compile-time and runtime checks based on declared array bounds. Flaxible Array Member used to be declared with the [0] synthax, but should now be expressed with [] syntax to respect C99 standard (§6.7.2.1). Signed-off-by: irozzo-1A <iacopo@sysdig.com>
|
Please double check driver/API_VERSION file. See versioning. /hold |
|
Please double check driver/SCHEMA_VERSION file. See versioning. /hold |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2760 +/- ##
=======================================
Coverage 74.57% 74.57%
=======================================
Files 292 292
Lines 30025 30025
Branches 4657 4657
=======================================
Hits 22392 22392
Misses 7633 7633
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| int64_t n_entries; | ||
| int64_t max_entries; | ||
| struct ppm_proc_info entries[0]; | ||
| struct ppm_proc_info entries[]; |
There was a problem hiding this comment.
Good catch, indeed '[]' is the modern, more portable way to define flexible arrays.
Perf diff from master - unit testsHeap diff from master - unit testsHeap diff from master - scap fileBenchmarks diff from master |
|
https://github.com/falcosecurity/libs/actions/runs/20261424717/job/58174173864?pr=2760 is a false positive, this change does not affect the SCHEMA_VERSION |
|
LGTM label has been added. DetailsGit tree hash: 6e923e39cd48afe75d362399d2406fd94fa408c9 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ekoops, irozzo-1A, terror96 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
Any specific area of the project related to this PR?
/area driver-kmod
Does this PR require a change in the driver versions?
What this PR does / why we need it:
UBSAN (Undefined Behaviour Sanitizer) performs compile-time and runtime checks based on declared array bounds. Flaxible Array Member used to be declared with the
[0]syntax, but should now be expressed with[]syntax to respect C99 standard (§6.7.2.1).Which issue(s) this PR fixes:
Fixes #2752
Special notes for your reviewer:
Does this PR introduce a user-facing change?: