logoalt Hacker News

catlifeonmars • today at 12:43 PM • 1 reply • view on HN

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?


Replies

FabCH • today at 1:38 PM

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++.

➕ show 1 reply