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

An error in C++ and Java implementation of diff_cleanupSemantic #36

Closed
GoogleCodeExporter opened this issue Apr 18, 2016 · 2 comments
Closed

Comments

@GoogleCodeExporter
Copy link

A pointer to the previous Diff is only assigned once and never advances.

Try to double delete/insert pair in the test for overlap elimination:
<del>abcxx</del><ins>xxdef</ins><del>abcxx</del><ins>xxdef</ins>

Original issue reported on code.google.com by snhere@gmail.com on 14 Jan 2011 at 9:22

@GoogleCodeExporter
Copy link
Author

Confirmed.  Thank you!  Wow, that's a rather embarrassing omission.  It's also 
a lesson that having 100% code coverage in tests is not a guarantee of 
correctness.

All languages using linked lists of diffs are affected:
  C++, Java
Languages which use indexed arrays of diffs are fine:
  C#, JavaScript, Lua, Python, Objective C (not released yet)

For the record, the nature of this bug is non-critical.  The output is 
completely valid, though the output is non-optimal.

Corrections have been made to the offending languages, a new unit test has been 
made for all languages, and the changes have been sent off for code review.  
Expect it to land on Wednesday or Friday.

Original comment by neil.fra...@gmail.com on 19 Jan 2011 at 2:42

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

New version has been uploaded.  Thanks for catching this.

Original comment by neil.fra...@gmail.com on 19 Jan 2011 at 9:37

  • Changed state: Fixed

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

No branches or pull requests

1 participant