- 
                Notifications
    You must be signed in to change notification settings 
- Fork 32
fix: Use uint64_t for RustBuffer fields to fix 32-bit ARM crash #313
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -26,7 +26,13 @@ pub(crate) trait RenderedFile: DynTemplate { | |
| let from = file | ||
| .parent() | ||
| .expect("Expected this file to have a directory"); | ||
| pathdiff::diff_utf8_paths(to, from).expect("Should be able to find a relative path") | ||
| let path = pathdiff::diff_utf8_paths(to, from).expect("Should be able to find a relative path"); | ||
|  | ||
| // Fix non-canonical paths: pathdiff can generate "cpp/.." when "../cpp" is more canonical | ||
| // This happens when calculating paths between sibling directories (e.g., android/ to cpp/) | ||
| // CMake and other tools prefer the "../dir" form over "dir/.." even though both work | ||
| let path_str = path.as_str().replace("cpp/..", "../cpp"); | ||
| Utf8PathBuf::from(path_str) | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm. I'm not sure if this works accidentally, or if this doesn't work. 
 Then, I'm also not sure where you're getting the  | ||
| } | ||
| fn filter_by(&self) -> bool { | ||
| true | ||
|  | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow, this is an excellent catch. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Yeah this crashed on me running in 32 bit. Required quite some digging to find!