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

Experiment ac rust/v4 #9902

Closed
wants to merge 6 commits into from

Conversation

victorjulien
Copy link
Member

#9896 with some fixes and updated the match loop to only count unique matches.

Still have to do benchmarks.

Experiment to see if we can use aho-corasick Rust crate for our MPM.

https://redmine.openinfosecfoundation.org/issues/3847

TODOs

  • test
  • move AC code into their own rust files
  • optimize match loop (+tests)
  • probably more

Comment on lines +219 to +220
let p = unsafe { build_slice!(pat, pat_len as usize) };
let s = unsafe { build_slice!(sids, sids_len as usize) };
Copy link
Member

Choose a reason for hiding this comment

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

Unsafe not needed here.

Copy link
Member Author

@victorjulien victorjulien Nov 28, 2023

Choose a reason for hiding this comment

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

yeah, this is a left over from when clippy adviced to mark the function unsafe, even though the compiler didn't require it. It feels odd to make the function unsafe while the unsafe parts are more limited. I would like rust to consider the other parts safe and be strict in its checks.

@victorjulien
Copy link
Member Author

replaced by #9904

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

Successfully merging this pull request may close these issues.

2 participants