git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [REGRESSION] git-wrapper to run-commands codepath regression

From
Jeff King <peff@peff.net>
Date
Apr 18, 2011, 21:43 UTC
Message-ID
<20110418214337.GB25104@sigill.intra.peff.net>
In-Reply-To
<7vvcyb6xww.fsf@alter.siamese.dyndns.org>
On Mon, Apr 18, 2011 at 02:40:31PM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > And here's the fix.
> 
> I was tempted to suggest the change in your patch.
> 
> With ebec842 (run-command: prettify -D_FORTIFY_SOURCE workaround,
> 2011-03-16) reverted, I still don't get complaints from -D_FORTIFY_SOURCE
> for run-command.c (but I do get "ignoring return value of 'fwrite' from
> many places).  Perhaps the kinds of checks done by versions of gcc you,
> Jonathan and I use are different.

I don't use _FORTIFY_SOURCE at all, so I have no clue. I just saw that the code in ebec842 is obviously wrong, and the fix looked equally obvious.

> I'd rather revert it for now; I don't want to see patch ping-pong at this
> late in the pre-release cycle.

That's your call, but the fix seems dead simple to me. _FORTIFY_SOURCE likes the conditional, according to Jonathan's patch. We don't remove the conditional, just the wrong "non-zero is an error" assumption. So I wouldn't expect any ping-pong on it, but then again, it looked like a pretty innocuous patch in the first place, and held a pretty nasty and surprising bug. :)

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 20 in “[REGRESSION] git-wrapper to run-commands codepath regression”
  1. Junio C HamanoApr 18, 2011
  2. Jeff KingApr 18, 2011
  3. Jeff KingApr 18, 2011
  4. Junio C HamanoApr 18, 2011
  5. Jeff KingApr 18, 2011
  6. Junio C HamanoApr 18, 2011
  7. Andreas SchwabApr 18, 2011
  8. Junio C HamanoApr 18, 2011
  9. Jonathan NiederApr 18, 2011
  10. run-command: write full error message in die_childJonathan Nieder, Apr 19, 2011
  11. Johannes SixtApr 20, 2011
  12. 0/2 Re: run-command: write full error message in die_childJonathan Nieder, Apr 20, 2011
  13. 1/2 tests: check error message from run_commandJonathan Nieder, Apr 20, 2011
  14. 2/2 run-command: handle short writes and EINTR in die_childJonathan Nieder, Apr 20, 2011
  15. Junio C HamanoApr 19, 2011
  16. report which $PATH entry had trouble running execvp(3)Junio C Hamano, Apr 20, 2011
  17. Jeff KingApr 20, 2011
  18. Junio C HamanoApr 21, 2011
  19. Johannes SixtApr 20, 2011
  20. Jonathan NiederApr 20, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.