Message ID | cover.1544729841.git.steadmon@google.com (mailing list archive) |
---|---|
Headers | show |
Series | Add commit-graph fuzzer and fix buffer overflow | expand |
On Thu, Dec 13, 2018 at 11:43:55AM -0800, Josh Steadmon wrote: > Add a new fuzz test for the commit graph and fix a buffer read-overflow > that it discovered. Additionally, fix the Makefile instructions for > building fuzzers. > > Changes since V3: > * Improve portability of the new test functionality. I thought there was some question about /dev/zero, which I think is in this version (I don't actually know whether there are portability issues or not, but somebody did mention it). -Peff
On 2018.12.18 12:35, Jeff King wrote: > On Thu, Dec 13, 2018 at 11:43:55AM -0800, Josh Steadmon wrote: > > > Add a new fuzz test for the commit graph and fix a buffer read-overflow > > that it discovered. Additionally, fix the Makefile instructions for > > building fuzzers. > > > > Changes since V3: > > * Improve portability of the new test functionality. > > I thought there was some question about /dev/zero, which I think is > in this version (I don't actually know whether there are portability > issues or not, but somebody did mention it). > > -Peff I've only found one reference [1] (from 1999) of OS X Server not having a /dev/zero. It appears to be present as of 2010 though [2]. [1]: https://macosx-admin.omnigroup.narkive.com/sAxj0XeP/dev-zero-equivalent-in-mac-os-x [2]: https://serverfault.com/questions/143248/zeroing-a-disk-with-dd-vs-disk-utility
On Tue, Dec 18, 2018 at 01:05:51PM -0800, Josh Steadmon wrote: > On 2018.12.18 12:35, Jeff King wrote: > > On Thu, Dec 13, 2018 at 11:43:55AM -0800, Josh Steadmon wrote: > > > > > Add a new fuzz test for the commit graph and fix a buffer read-overflow > > > that it discovered. Additionally, fix the Makefile instructions for > > > building fuzzers. > > > > > > Changes since V3: > > > * Improve portability of the new test functionality. > > > > I thought there was some question about /dev/zero, which I think is > > in this version (I don't actually know whether there are portability > > issues or not, but somebody did mention it). > > > > -Peff > > I've only found one reference [1] (from 1999) of OS X Server not having > a /dev/zero. It appears to be present as of 2010 though [2]. Thanks for digging. That seems like enough to assume we should try it and see if any macOS people complain. I do wonder if we'll run into problems on Windows, though. -Peff
Hi Peff, On Wed, 19 Dec 2018, Jeff King wrote: > On Tue, Dec 18, 2018 at 01:05:51PM -0800, Josh Steadmon wrote: > > > On 2018.12.18 12:35, Jeff King wrote: > > > On Thu, Dec 13, 2018 at 11:43:55AM -0800, Josh Steadmon wrote: > > > > > > > Add a new fuzz test for the commit graph and fix a buffer read-overflow > > > > that it discovered. Additionally, fix the Makefile instructions for > > > > building fuzzers. > > > > > > > > Changes since V3: > > > > * Improve portability of the new test functionality. > > > > > > I thought there was some question about /dev/zero, which I think is > > > in this version (I don't actually know whether there are portability > > > issues or not, but somebody did mention it). > > > > > > -Peff > > > > I've only found one reference [1] (from 1999) of OS X Server not having > > a /dev/zero. It appears to be present as of 2010 though [2]. > > Thanks for digging. That seems like enough to assume we should try it > and see if any macOS people complain. > > I do wonder if we'll run into problems on Windows, though. As long as we're talking about Unix shell scripts, /dev/zero should be fine, as we are essentially running in a variant of Cygwin. If you try to pass /dev/zero as an argument to a Git command, that's an entirely different thing: this most likely won't work. Ciao, Dscho
On Thu, Dec 20, 2018 at 08:35:57PM +0100, Johannes Schindelin wrote: > > I do wonder if we'll run into problems on Windows, though. > > As long as we're talking about Unix shell scripts, /dev/zero should be > fine, as we are essentially running in a variant of Cygwin. > > If you try to pass /dev/zero as an argument to a Git command, that's an > entirely different thing: this most likely won't work. Thanks for confirming. We're talking about passing it to dd here, so I think it should be OK. -Peff
Jeff King <peff@peff.net> writes: > On Tue, Dec 18, 2018 at 01:05:51PM -0800, Josh Steadmon wrote: > >> On 2018.12.18 12:35, Jeff King wrote: >> > On Thu, Dec 13, 2018 at 11:43:55AM -0800, Josh Steadmon wrote: >> > >> > > Add a new fuzz test for the commit graph and fix a buffer read-overflow >> > > that it discovered. Additionally, fix the Makefile instructions for >> > > building fuzzers. >> > > >> > > Changes since V3: >> > > * Improve portability of the new test functionality. >> > >> > I thought there was some question about /dev/zero, which I think is >> > in this version (I don't actually know whether there are portability >> > issues or not, but somebody did mention it). >> > >> > -Peff >> >> I've only found one reference [1] (from 1999) of OS X Server not having >> a /dev/zero. It appears to be present as of 2010 though [2]. > > Thanks for digging. That seems like enough to assume we should try it > and see if any macOS people complain. Our tests have been relying on /dev/zero since 852a1710 ("am: let command-line options override saved options", 2015-08-04) that appeared in v2.6.0. Anybody who has trouble with /dev/zero now has kept silent for about a dozen major releases, I think, and will be silent with this one, too ;-) > > I do wonder if we'll run into problems on Windows, though. > > -Peff