Skip to content

Conversation

@paxos
Copy link

@paxos paxos commented Feb 6, 2022

Some patches will cause an out of bounds exception (which would crash if directly applied to any tables). This PR adds two test scenarios that show the behavior.

I am not sure how to fix this, but wanted to share the results of my research.

I also generated a couple of more test cases which will cause the same error:

[0, 7, 3, 7, 4] -> [9, 9, 1, 8, 4, 7, 2, 7, 7, 5] 
[6, 2, 2, 3] -> [10, 4, 8, 3, 6, 2] 
[7, 0, 8, 1, 3, 9, 7] -> [7, 7, 4, 8, 6, 9, 5, 1, 3] 
[7, 0, 0, 2] -> [5, 4, 8, 2, 10, 5, 7, 9, 0, 10] 
[2, 1, 4, 7] -> [10, 7, 4, 3, 2, 0, 5, 1, 5, 8] 
[8, 10, 6, 7, 6, 2] -> [4, 5, 1, 9, 3, 2, 8, 6, 3, 9] 
[10, 1, 5, 8, 3, 7] -> [0, 10, 10, 6, 10, 7, 2, 10, 5, 3] 
[7, 0, 10, 2, 5] -> [9, 9, 7, 9, 5, 0, 10] 
[9, 10, 1, 10] -> [5, 5, 7, 10, 8, 6, 9, 10] 
[10, 2, 4, 10, 6] -> [7, 0, 7, 8, 6, 1, 0, 10, 2] 
[5, 5, 0, 9, 0, 6] -> [1, 4, 10, 1, 2, 6, 0, 3, 0, 9] 
[7, 7, 6, 7, 1] -> [0, 9, 8, 4, 1, 9, 7, 7, 4, 3] 
[1, 2, 10, 7] -> [3, 3, 5, 7, 5, 4, 2, 10, 8] 
[3, 1, 9, 10] -> [5, 0, 2, 10, 0, 1, 9, 9, 0] 
[2, 3, 2, 1, 4] -> [9, 0, 4, 1, 0, 3, 2] 
[7, 1, 6, 6] -> [0, 0, 2, 6, 2, 7, 4, 9, 8, 6] 
[8, 0, 10, 10, 5, 6] -> [3, 8, 1, 8, 4, 6, 10, 2, 5, 4] 
[0, 10, 3, 4, 6] -> [9, 8, 8, 1, 6, 0, 3, 4, 3] 
[6, 1, 4, 3] -> [9, 5, 5, 3, 4, 1, 4] 
[9, 0, 10, 5] -> [1, 2, 7, 5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 
[0, 8, 3] -> [10, 10, 3, 0, 4, 7, 1, 1, 10, 8] 
[0, 3, 2] -> [8, 9, 2, 2, 2, 0, 7, 3, 6] 
[3, 8, 1, 3, 10] -> [6, 4, 2, 4, 10, 7, 3, 3, 3] 
[2, 9, 6, 8, 10] -> [0, 7, 9, 1, 10, 2, 10, 9, 6] 
[6, 2, 9, 0, 10, 2, 8] -> [5, 10, 0, 5, 0, 7, 8, 10, 2, 0] 
[4, 7, 7] -> [5, 3, 7, 6, 4, 7, 1, 6, 8] 
[2, 10, 2, 9] -> [6, 0, 7, 9, 4, 5, 1, 9, 2, 2] 
[3, 8, 8, 7] -> [2, 2, 9, 7, 10, 8, 1, 10, 8, 9] 
[3, 2, 3, 8, 2, 1] -> [0, 9, 4, 3, 5, 1, 3, 3, 2, 5] 
[2, 0, 5] -> [3, 3, 5, 3, 4, 5, 2, 0, 1] 
[2, 3, 6] -> [5, 0, 6, 1, 6, 0, 6, 0, 2, 3] 

Copy link
Owner

@tonyarnold tonyarnold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests that show the problem are my favourite! Thank you for doing this.

It would be good if you could revert the changes to the Xcode project definition before I merge this in.

@paxos
Copy link
Author

paxos commented Feb 6, 2022

Pushed an update. Also, many thanks for your work maintaining this library!

@paxos
Copy link
Author

paxos commented Mar 25, 2022

I start to think this might be caused by duplicates in the target 🤔

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants