Skip to content
New issue

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

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

Already on GitHub? # to your account

new(gha): enable UndefinedBehaviorSanitizer #1685

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

LucaGuerra
Copy link
Contributor

@LucaGuerra LucaGuerra commented Feb 12, 2024

What type of PR is this?

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

/kind feature

Any specific area of the project related to this PR?

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

/area CI

Does this PR require a change in the driver versions?

No

What this PR does / why we need it:

This enables UBSan for tests. Please note that it's a work in progress until we are sure it works.
EDIT: it works with no warnings with the current state of the repo, so it's out of wip!

Which issue(s) this PR fixes:

Fixes #1470

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@LucaGuerra
Copy link
Contributor Author

LucaGuerra commented Feb 12, 2024

Enforcement is not enabled yet. The following warnings were identified by the GHA run:

  • 2024-02-12T15:32:15.5043419Z /__w/libs/libs/userspace/libsinsp/container.cpp:303:58: runtime error: load of value 3200171710, which is not a valid value for type 'sinsp_container_type'
  • 2024-02-12T15:32:15.5046109Z /__w/libs/libs/userspace/libsinsp/container_info.h:37:44: runtime error: load of value 3200171710, which is not a valid value for type 'sinsp_container_type'
  • 2024-02-12T15:32:15.5048629Z /usr/include/c++/8/tuple:1668:70: runtime error: load of value 3200171710, which is not a valid value for type 'sinsp_container_type'

In sinsp_with_test_input.CLONE_CHILD_check_event_tinfo:

  • 2024-02-12T15:32:24.6114438Z /__w/libs/libs/userspace/libsinsp/parsers.cpp:1706:47: runtime error: load of value 190, which is not a valid value for type 'bool'
  • 2024-02-12T15:32:24.6116431Z /__w/libs/libs/userspace/libsinsp/parsers.cpp:1708:50: runtime error: load of value 190, which is not a valid value for type 'bool'
  • 2024-02-12T15:32:24.6117803Z /__w/libs/libs/userspace/libsinsp/parsers.cpp:1710:49: runtime error: load of value 190, which is not a valid value for type 'bool'

In fspath.mkdir:

  • 2024-02-12T15:32:24.6571001Z /__w/libs/libs/userspace/libsinsp/sinsp_filtercheck.cpp:454:27: runtime error: load of misaligned address 0x60400001e96c for type 'int64_t', which requires 8 byte alignment
    2024-02-12T15:32:24.6572639Z 0x60400001e96c: note: pointer points here
    2024-02-12T15:32:24.6573572Z 00 00 08 00 00 00 00 00 00 00 00 00 be be be be be be be 00 00 00 00 00 03 00 00 00 00 00 00 04
    2024-02-12T15:32:24.6574473Z ^

@LucaGuerra
Copy link
Contributor Author

/milestone 0.15.0

@poiana poiana added this to the 0.15.0 milestone Feb 14, 2024
Signed-off-by: Luca Guerra <luca@guerra.sh>
@LucaGuerra LucaGuerra force-pushed the new/gha-enable-ubsan branch 3 times, most recently from 2ef2abf to eeb503f Compare February 16, 2024 10:19
@LucaGuerra LucaGuerra changed the title wip: new(gha): enable UndefinedBehaviorSanitizer new(gha): enable UndefinedBehaviorSanitizer Feb 16, 2024
@LucaGuerra
Copy link
Contributor Author

I have removed the wip. After the CI passes I think we can merge this.

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
LOVE THIS ONE

@poiana
Copy link
Contributor

poiana commented Feb 16, 2024

LGTM label has been added.

Git tree hash: 75f6b7f4a0e0f9e521eb80d2a7e97cd440e5fa29

@poiana
Copy link
Contributor

poiana commented Feb 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, leogr, LucaGuerra

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:
  • OWNERS [FedeDP,LucaGuerra,leogr]

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 2f4e75e into falcosecurity:master Feb 16, 2024
68 checks passed
@LucaGuerra LucaGuerra deleted the new/gha-enable-ubsan branch February 16, 2024 16:45
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support UndefinedBehaviorSanitizer in CI/test builds
4 participants