-
-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a an issue with memory being written to after it was freed, lea…
…ding to abort signals from malloc (#565) * Fixed a memory scribble issue in rust binding, leading to abort signals coming from malloc
- Loading branch information
Showing
6 changed files
with
138 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#[cfg(test)] | ||
pub(crate) mod assertions { | ||
use regex::Regex; | ||
|
||
pub(crate) fn assert_regex_matches(regex: &str, value: &str) { | ||
let compiled_regex = Regex::new(regex).unwrap(); | ||
assert!(compiled_regex.is_match(value), "Expected to match {}, got {}", regex, value); | ||
} | ||
} | ||
|
||
#[cfg(test)] | ||
pub mod consts { | ||
pub(crate) const VERSION_PATTERN: &str = r"^\d+\.\d+\.\d+$"; | ||
} |