git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / Atom feed
From: Pratyush Yadav <me@yadavpratyush.com>
To: Philip Oakley <philipoakley@iee.email>
Cc: Git List <git@vger.kernel.org>
Subject: Re: Git Gui: Branch->create currently fails...
Date: Thu, 17 Oct 2019 00:22:21 +0530
Message-ID: <20191016185221.hufjb4uavacumbmc@yadavpratyush.com> (raw)
In-Reply-To: <dc8a9b93-a2e7-4fbf-0ea7-f1a855f4b926@iee.email>

On 14/10/19 11:11PM, Philip Oakley wrote:
> On 14/10/2019 18:57, Pratyush Yadav wrote:
> > > list "refs/heads/MSVC-README" [list "commit"
> > > "056fb95c8e983ec07e9f5f8baa0b119bf3d13fed" [concat "" "Philip Oakley"]
> > > [reformat_date [concat "" "Sun May 19 22:33:37 2019 +0100"]]
> > > "compat/vcSegmentation fault
> > > 
> > > 
> > > Not exactly the same, but almost. Ends the same place, with as similar short
> > > line.
> > > This is run inside the bash that is started directly by the git-for-windows
> > > sdk start icon. (Target: C:\git-sdk-64\git-bash.exe   Stat in:
> > > C:/git-sdk-64/)
> > > 
> > > so looks to be MSYS2/bash related.
> > Ah, so it is an upstream issue. I guess we can just report it and wait
> > for them to fix it.
> I'd missed the final 'Segmentation fault' on the last line in the bash
> output that wasn't there for the captured file.
> 
> That was repeatable in re-testing.
> But failed if I changed the $fmt string to a plain text 500 char string
> ("1234567890123...").
> 
> I've still to trim down the complicated $fmt string to see if I can see
> where that seg fault starts (i.e. some form of MVCE), so that it can be
> investigated.
> Possibly should check if the --tcl flag actually invokes any tcl! Otherwise
> it's fully in the Git/G-f-W zone.

A quick look tells me '--tcl' does not invoke any Tcl. It is just used 
to output properly formatted strings for Tcl. The option sets the value 
of 'format.quote_style' in for-each-ref (builtin/for-each-ref.c:33). 
That value is later indirectly ends up being used in the function 
ref_filter.c::quote_formatting.

The Tcl code we execute comes from the long $fmt string, which is built 
in git-gui/choose_rev.tcl:133-147. `for-each-ref` just fills in the 
placeholder values, properly formatting them for use in Tcl.

As an experiment, you can try removing '--tcl' from the `for-each-ref` 
command that segfaults, just to be sure. It would probably output 
invalid Tcl, but since we don't do anything with that output, it doesn't 
really matter, and would let us know if '--tcl' is really the culprit.

> ...
> Just rebuilt (I hope) the Windows Subsystem for Linux (WSL) with git v2.23.0
> installed and got:
> 
> list "refs/heads/MSVC-README" [list "commit"
> "056fb95c8e983ec07e9f5f8baa0b119bf3d13fed" [concat "" "Philip Oakley"]
> [reformat_date [concat "" "Sun May 19 22:33:37 2019 +0100"]]
> "compat/vcbuild/README: clean/update 'vcpkg' env for Visual Studio updates"]
> [list "" "" "" [reformat_date ""] ""]
> munmap_chunk(): invalid pointer

A quick Google search tells me munmap_chunk() is probably related to an 
invalid pointer being freed. Either a double free or a free on a pointer 
not allocated by malloc or something similar.

> Aborted (core dumped)
> root@Philip-Win10:/mnt/c/git-sdk-64/usr/src/git#
> 
> 
> That said, haven't got the gitk and git gui to work yet on the WSL because
> it doesn't like the tcl/tk.
> 
> It's a bit of a hole digging exercise.

-- 
Regards,
Pratyush Yadav

  reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07 22:02 Philip Oakley
2019-10-07 22:05 ` Philip Oakley
2019-10-08  0:00 ` Pratyush Yadav
2019-10-12 20:34   ` Philip Oakley
2019-10-13 18:50     ` Pratyush Yadav
2019-10-14 12:45       ` Philip Oakley
2019-10-14 17:57         ` Pratyush Yadav
2019-10-14 22:11           ` Philip Oakley
2019-10-16 18:52             ` Pratyush Yadav [this message]
2019-10-18 21:05               ` Philip Oakley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191016185221.hufjb4uavacumbmc@yadavpratyush.com \
    --to=me@yadavpratyush.com \
    --cc=git@vger.kernel.org \
    --cc=philipoakley@iee.email \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

git@vger.kernel.org list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git