Re: [PATCH 1/3] Demonstrate a problem: our pickaxe code assumes NUL-terminated buffers
- From
Jeff King <peff@peff.net>
- Date
- Sep 6, 2016, 18:43 UTC
- Message-ID
- <20160906184320.lzg5jizpw2kbzf72@sigill.intra.peff.net>
- In-Reply-To
- <ca678535c64570add58cfff95709c3c67384139d.1473090278.git.johannes.schindelin@gmx.de>
On Mon, Sep 05, 2016 at 05:45:02PM +0200, Johannes Schindelin wrote:
Show 11 quoted lines
> Typically, on Linux the test passes. On Windows, it fails virtually > every time due to an access violation (that's a segmentation fault for > you Unix-y people out there). And Windows would be correct: the > regexec() call wants to operate on a regular, NUL-terminated string, > there is no NUL in the mmap()ed memory range, and it is undefined > whether the next byte is even legal to access. > > When run with --valgrind it demonstrates quite clearly the breakage, of > course. > > So we simply mark it with `test_expect_success` for now.
I'd prefer if this were marked as expect_failure. It fails reliably for me on Linux, even without --valgrind. But even if that were not so, there is no reason to hurt bisectability of somebody running with "--valgrind" (not when it costs so little to mark it correctly).
-Peff