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

Re: Bus Error- git merge

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 30, 2009, 18:57 UTC
Message-ID
<alpine.DEB.1.00.0901301950100.3586@pacific.mpi-cbg.de>
In-Reply-To
<C5A883D0.E243%bmoran@onehub.com>
Hi,
On Fri, 30 Jan 2009, Brian Moran wrote:
> I am getting a bus error on a git merge, including the more recent versions.
> Following the instructions from a bug August, I got the latest sources,
> compiled them up, and executed the merge in the debugger to repro. Here¹s
> what I found:
Is it possible that your branch has submodules?
Show 29 quoted lines
> gdb ../git-1.6.1.2/git-merge
> GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct  2 04:07:49 UTC
> 2007)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i386-apple-darwin"...Reading symbols for shared
> libraries ........ done
> 
> (gdb) set args -v v1-ftp-support
> (gdb) run
> Starting program: /Users/bmo/Documents/repo/git-1.6.1.2/git-merge -v
> v1-ftp-support
> Reading symbols for shared libraries +++++++. done
> 
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_PROTECTION_FAILURE at address: 0x00000004
> 0x000863c3 in sha_eq (a=0x4 <Address 0x4 out of bounds>, b=0x7bf004 "<some
> random chars>") at cache.h:575
> 575        return memcmp(sha1, sha2, 20);
> 
> (gdb) backtrace
> #0  0x000863c3 in sha_eq (a=0x4 <Address 0x4 out of bounds>, b=0x7bf004
> "<some random chars>") at cache.h:575
> #1  0x00086dc6 in merge_trees (o=0xbfffedd4, head=0x7bf020, merge=0x7bf000,
> common=0x0, result=0xbfffed28) at merge-recursive.c:1164
common=0x0, that's the issue.
> #2  0x00088960 in merge_recursive (o=0xbfffedd4, h1=0x4f4060, h2=0x4f4000,
> ca=0x53cc20, result=0xbfffee2c) at merge-recursive.c:1294

However, here I read in my version of merge-recursive.c that "common" is the tree of merged_common_ancestor, which is either set to "pop_commit(&ca)", i.e. to one of the common ancestors, or to a virtual commit, that must have a tree.

So it would be good if you could debug this further, letting me know where the merged_common_ancestor came from, and why it does not have a tree.

Thanks, Dscho

Previous: Brian MoranNext: Brian Moran
Message 2 of 4 in “Bus Error- git merge”
  1. Brian MoranJan 30, 2009
  2. Johannes SchindelinJan 30, 2009
  3. Brian MoranJan 31, 2009
  4. Johannes SchindelinFeb 1, 2009

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.