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 sanitizer errors in testcases #1096

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bjosv
Copy link

@bjosv bjosv commented Jan 12, 2024

  • Fixed the heap-use-after-free issues in TPGRxStatsTest.
    The tests uses tpg_header when validating the statistics while its memory m1 has been freed.
    tmp_buf is not used in tests but is now correct in size.

  • Fixed direct and indirect leaks in tests
    Fixed a couple of testcases that triggered errors by the leak sanitizer.

All issues are due to missing actions in the testcases.

There are still 2 testcase left that are expected to leak for some reason:

  • gt_astf_inter.astf_negative_2
  • gt_astf_inter.astf_negative_3

while negative_4 and negative_5 are commented away in legacy. Maybe we should remove all of them?
The flows are already covered by other testcases, except they perform proper cleanup.

Currently we need to filter out these negative testruns when using memory analysis tools:
./bp-sim-64 --ut --gtest_filter='-*.astf_negative*'

The tests uses `tpg_header` when validating the statistics
while its memory `m1` has been freed.
`tmp_buf` is not used in tests but is now correct in size.

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Fixed a couple of testcases that triggered errors by the leak
sanitizer. All issues are due to missing actions in the testcases.

There are still 2 testcase left that are expected to leak:
 gt_astf_inter.astf_negative_2
 gt_astf_inter.astf_negative_3

so testruns needs to filter out these using:
./bp-sim-64 --ut --gtest_filter='-*.astf_negative*'

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
@trex-bot
Copy link

Checked SHA: c5fb3ee
Status: FAILURE
Link to job: http://81.218.86.50:8080/job/trex_build/813/

@hhaim
Copy link
Contributor

hhaim commented Feb 25, 2024

recheck

@trex-bot
Copy link

Checked SHA: c5fb3ee
Status: FAILURE
Link to job: http://81.218.86.50:8080/job/trex_build/822/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants