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

Re: [PATCH 2/5] common-main: call git_extract_argv0_path()

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 1, 2016, 08:05 UTC
Message-ID
<alpine.DEB.2.20.1607011000320.12947@virtualbox>
In-Reply-To
<20160701060404.GB4593@sigill.intra.peff.net>
Hi Peff,
On Fri, 1 Jul 2016, Jeff King wrote:
Show 20 quoted lines
> This has been an accident-waiting-to-happen for a long time,
> but wasn't triggered until recently because it involves one
> of those programs actually calling system_path(). That
> happened with git-credential-store in v2.8.0 with ae5f677
> (lazily load core.sharedrepository, 2016-03-11). The
> program:
> 
>   - takes a lock file, which...
> 
>   - opens a tempfile, which...
> 
>   - calls adjust_shared_perm to fix permissions, which...
> 
>   - lazy-loads the config (as of ae5f677), which...
> 
>   - calls system_path() to find the location of
>     /etc/gitconfig
> 
> On systems with RUNTIME_PREFIX, this means credential-store
> reliably hits that assert() and cannot be used.

Thank you for that thorough write-up. I am now even more upset that we had to go through the same steps (it took me an hour to figure out what was going wrong, mostly due to abort() *not* spitting out a stack trace, so I had to wield some gdb magic).

I am partly to blame here, of course, because I did not report what I did to this mailing list. But then: 1) I considered this a Windows-only problem, and 2) I was really already swamped, as it were.

The patch is good, of course, as are the rest of the patches (I did not really look at them very thoroughly, but then, they are pretty obvious improvements).

Ciao, Dscho

Previous: Jeff KingNext: Jeff King
Message 11 of 21 in “git-credentials-store.exe crash”
  1. dmh@ucar.eduJun 30, 2016
  2. Jeff KingJul 1, 2016
  3. 0/5 consistent setup code for external commandsJeff King, Jul 1, 2016
  4. 1/5 add an extra level of indirection to main()Jeff King, Jul 1, 2016
  5. Johannes SchindelinJul 1, 2016
  6. Jeff KingJul 1, 2016
  7. Johannes SchindelinJul 1, 2016
  8. Jeff KingJul 1, 2016
  9. Johannes SchindelinJul 2, 2016
  10. 2/5 common-main: call git_extract_argv0_path()Jeff King, Jul 1, 2016
  11. Johannes SchindelinJul 1, 2016
  12. 3/5 common-main: call sanitize_stdfds()Jeff King, Jul 1, 2016
  13. 5/5 common-main: call git_setup_gettext()Jeff King, Jul 1, 2016
  14. 4/5 common-main: call restore_sigpipe_to_default()Jeff King, Jul 1, 2016
  15. Johannes SchindelinJul 1, 2016
  16. Junio C HamanoJul 1, 2016
  17. Jeff KingJul 1, 2016
  18. Junio C HamanoJul 6, 2016
  19. Johannes SchindelinJul 6, 2016
  20. Johannes SchindelinJul 1, 2016
  21. Jeff KingJul 1, 2016

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.