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

Rustc 178 fixes 7013 v4 #11062

Closed
wants to merge 4 commits into from

Conversation

catenacyber
Copy link
Contributor

Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/7013

Describe changes:

  • Fix build with rustc 1.78
  • do not bother to free a null pointer in tests
  • rust: return empty slice without using from_raw_parts fro StreamSlice
  • protocol detection/probing : consistently check for NULL input (was done for half of the protocols)

#11041 with code review taken into account

  • revert of temporary 14ab9aa cc @jasonish what was the purpose of this commit ?

As this triggers rustc 1.78
unsafe precondition(s) violated: slice::from_raw_parts requires
the pointer to be aligned and non-null,
and the total size of the slice not to exceed `isize::MAX`

Ticket: 7013
Ticket: 7013

Done consistently for all protocols

This may change some protocols behaviors which failed early
if they found there was not enough data...
Copy link

codecov bot commented May 14, 2024

Codecov Report

Attention: Patch coverage is 77.41935% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 83.62%. Comparing base (cb56752) to head (3d2b65e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11062      +/-   ##
==========================================
- Coverage   83.63%   83.62%   -0.02%     
==========================================
  Files         922      922              
  Lines      250321   250342      +21     
==========================================
- Hits       209349   209336      -13     
- Misses      40972    41006      +34     
Flag Coverage Δ
fuzzcorpus 64.20% <74.19%> (-0.02%) ⬇️
livemode 18.41% <0.00%> (-0.01%) ⬇️
suricata-verify 62.73% <70.96%> (-0.03%) ⬇️
unittests 62.26% <6.45%> (-0.01%) ⬇️

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

@victorjulien victorjulien removed their request for review May 14, 2024 11:39
@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 20596

@jasonish
Copy link
Member

revert of temporary 14ab9aa cc @jasonish what was the purpose of this commit ?

To revert back to previous rustc behavior to get it my PRs to pass qa.

Copy link
Member

@jasonish jasonish left a comment

Choose a reason for hiding this comment

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

LGTM.

@victorjulien victorjulien added this to the 8.0 milestone May 15, 2024
@victorjulien
Copy link
Member

Merged in #11084, thanks!

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