News for hackers. Stuff that matters.
Re:Ethereum is Doomed (2016) by troutwine on Tuesday January 15, 2019 @02:45PM (#18914257)
Sure. In Rust there's a function called [`str::repeat`](https://doc.rust-lang.org/std/primitive.str.html#method.repe...) that takes a string slice and repeats it a number of times, allocating a new String in the process.

Do there exist inputs -- either string or repetitions -- for which the following function does not panic owing to allocation issues (as documented) but either 1. cause a SIGBART or similar to be thrown or 2. fail to produce a new string which is the correct multiple size of the original string slice?

It's not possible, I contend, to answer this question with tests. The cardinality of input strings and repetitions is bounded but very, very high. You can for sure find _examples_ where `str::repeat` functions as documented but demonstrating that it always will is a different thing.

Re:Ethereum is Doomed (2016) by dooglius on Tuesday January 15, 2019 @04:02PM (#18915209)
GP is asking for cases where testing is demonstrably insufficient, not cases where you personally aren't convinced. If `str::repeat` is actually buggy for some inputs, in spite of testing, that would suffice as a counterexample.
Re:Ethereum is Doomed (2016) by troutwine on Tuesday January 15, 2019 @05:02PM (#18915896)
Ah, sure. What I'm trying to get at is discovering those inputs is the real trick. Comments elsewhere in this thread about exhaustive testing do a better job of getting at the same idea.