-
Notifications
You must be signed in to change notification settings - Fork 413
DiffLine mangled memory #1135
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
Comments
I've added another commit where only the |
Thanks for the report! I have opened a fix at #1141. |
Nice 🙏 Have you tested it on the example repo I posted or would you like me to? 😊 |
Yea, I tested it. It will now fail to compile because of the lifetimes. You'll need to copy the buffers if you want it to outlive the |
Ah, that makes sense 👌 Thanks for the explanation! |
I've come across a strange issue where the use of a
DiffLine
in two different locations ends up with some mangled looking output. I've created a reproducible in this repository https://github.com/FintanH/git2-diff-memory. If youcargo run
you should see the following output:Afaict, the outputs should be equal – the range of lines is not different so it should not be selecting other data. My best guess is that the raw pointer within the
DiffLine
is getting corrupted somehow by returning it within theVec
.Let me know if I can provide anymore info to help 😊
The text was updated successfully, but these errors were encountered: