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

[BUG] git --git-dir dies with bus error

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Dec 20, 2006, 14:47 UTC
Message-ID
<CF24F5E4-AE2F-48FD-A0C5-474D8BFA757F@silverinsanity.com>
In-Reply-To
<45892E16.2040301@op5.se>
On Dec 20, 2006, at 7:35 AM, Andreas Ericsson wrote:
Show 5 quoted lines
> AFAIR, the discussions long ago went along the lines of "if no  
> argument is passed to any of the --*-dir options, print out the  
> current value". If "git --git-dir" doesn't print the directory name  
> of the .git directory inside the repo you're currently in, I'd  
> consider it a bug.
Consider this a bug then:

$ git --git-dir Bus error $ git --version git version 1.4.4.1.GIT $ git rev-parse origin/master 8336afa563fbeff35e531396273065161181f04c $ gdb git (gdb) set args --git-dir (gdb) run Starting program: /usr/local/stow/git/src/git/git --git-dir Reading symbols for shared libraries ..+ done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x900332e6 in setenv ()
(gdb) bt
#0  0x900332e6 in setenv ()
#1  0x00001f9e in handle_options (argv=0xbffff4a4, argc=0xbffff4a0)  
at git.c:76
#2  0x000022da in main (argc=1, argv=0xbffff504, envp=0xbffff50c) at  
git.c:346

My current HEAD (and installed version) just includes my "remove COLLISION_CHECK" patch on top of git master. This is on OS 10.4.8 with fink 0.26. It appears to be trying to set GIT_DIR to some non- set section of memory. Bad git, bad. I'd try to patch this myself (to at least display an error instead of dying), but I'm deep in my actual project code right now.

Previous: Andreas EricssonNext: Jakub Narebski
Message 6 of 11 in “Implement poor-man's submodule support in pre-commit hook”
  1. Implement poor-man's submodule support in pre-commit hookAndy Parkins, Dec 20, 2006
  2. Andy ParkinsDec 20, 2006
  3. Brian GernhardtDec 20, 2006
  4. Jakub NarebskiDec 20, 2006
  5. Andreas EricssonDec 20, 2006
  6. [BUG] git --git-dir dies with bus errorBrian Gernhardt, Dec 20, 2006
  7. Jakub NarebskiDec 20, 2006
  8. Andy ParkinsDec 20, 2006
  9. Junio C HamanoDec 20, 2006
  10. Andy ParkinsDec 21, 2006
  11. Junio C HamanoDec 21, 2006

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.