-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Creating a regexes from an empty string crashes with an OOB #13843
Comments
cc @BurntSushi |
@Polyphemus noted in #14018 Using an empty string as the The following is a compilable test-case:
The backtrace from
A backtrace for the program when the
The problem seems to be that in rust/src/libregex/parse.rs |
fix: generate async delegate methods Fixes a bug where the generated async method doesn't await the result before returning it. This is an example of what the output looked like: ```rust struct Age<T>(T); impl<T> Age<T> { pub(crate) async fn age<J, 'a>(&'a mut self, ty: T, arg: J) -> T { self.0 } } struct Person<T> { age: Age<T>, } impl<T> Person<T> { pub(crate) async fn age<J, 'a>(&'a mut self, ty: T, arg: J) -> T { self.age.age(ty, arg) // .await is missing } } ``` The `.await` is missing, so the return type is `impl Future<Output = T>` instead of `T`
fix rust-lang#13843 The `manual_div_ceil` lint makes incorrect suggestion when type suffixes need to be made explicit in the suggested code. changelog: [`manual_div_ceil`]: suggested code now includes appropriate type suffixes where necessary
The text was updated successfully, but these errors were encountered: