Hacker News new | ask | show | jobs
by catlifeonmars 32 days ago
How would one craft an input that maximizes the runtime of your diff while staying below some (reasonable) bound of edit distance apart? Basically suppose I wanted to provide a malicious diff designed to hang or timeout the diff program, how would I construct it?
1 comments

You need to maximize the size of the residual tree sent to the final APTED step.

I actually don’t know how to do that and stay under a bounded edit distance.

Alternatively, you can crash it if you just encode the entire “Star Trek - In the pale moonlight” episode as a sequence of bytes in a const int array in C++.

> I actually don’t know how to do that and stay under a bounded edit distance.

I’m sure there’s an interesting result there, but I am not the person to find it :D

Good episode btw