Re: [PATCH] mingw-multibyte: fix memory acces violation and path length limits.

2013-10-05 Thread Wataru Noguchi
Hi, I put following printf logs. int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath) { static char path[PATH_MAX + 1]; struct stat st; int len = state-base_dir_len; if (topath) return

Re: [PATCH] mingw-multibyte: fix memory acces violation and path length limits.

2013-10-03 Thread Antoine Pelisse
I've not followed the thread so much but, in that entry.c::checkout_entry,() we do: memcpy(path, state-base_dir, len); strcpy(path + len, ce-name); which can of course result in memory violation if PATH is not long enough. On Thu, Oct 3, 2013 at 12:26 AM, Wataru Noguchi wnoguchi.0...@gmail.com

Re: [PATCH] mingw-multibyte: fix memory acces violation and path length limits.

2013-10-03 Thread Erik Faye-Lund
On Thu, Oct 3, 2013 at 7:25 PM, Antoine Pelisse apeli...@gmail.com wrote: I've not followed the thread so much but, in that entry.c::checkout_entry,() we do: memcpy(path, state-base_dir, len); strcpy(path + len, ce-name); which can of course result in memory violation if PATH is not long

Re: [PATCH] mingw-multibyte: fix memory acces violation and path length limits.

2013-10-02 Thread Wataru Noguchi
Hi, At last, I foundfollowing Makefile optimization suppression works fine in my case. CFLAGS = -g -O2 -fno-inline-small-functions -Wall Following optimization option cause crash, -finline-small-functions // entry.c:237 int checkout_entry(struct cache_entry *ce, const

Re: [PATCH] mingw-multibyte: fix memory acces violation and path length limits.

2013-10-01 Thread Wataru Noguchi
Hi, Thanks for your patch. Unfortunately, in my case still crash... But PATH_MAX length kinds issues interesting. I'll try investigate a little more. - PATH_MAX and O2 Thanks. (2013/10/01 2:00), René Scharfe wrote: Am 29.09.2013 04:56, schrieb Wataru Noguchi: Hi, Thanks for comments.

Re: [msysGit] [PATCH] mingw-multibyte: fix memory acces violation and path length limits.

2013-10-01 Thread Wataru Noguchi
Hi, Thanks for your advice. I see. I'll try following tool for optimization affection. Thanks. (2013/09/29 20:01), Stefan Beller wrote: On 09/29/2013 04:56 AM, Wataru Noguchi wrote: - gcc optimization level is O2.(fail) - gcc O0, O1 works fine. Maybe you could try to compile with STACK

Re: [PATCH] mingw-multibyte: fix memory acces violation and path length limits.

2013-09-30 Thread René Scharfe
Am 29.09.2013 04:56, schrieb Wataru Noguchi: Hi, Thanks for comments. My currently working repository is https://github.com/wnoguchi/git/tree/hotfix/mingw-multibyte-path-checkout-failure I have revert commits to 1f10da3. I'll try failure step. - gcc optimization level is O2.(fail)

Re: [PATCH] mingw-multibyte: fix memory acces violation and path length limits.

2013-09-30 Thread Erik Faye-Lund
On Mon, Sep 30, 2013 at 7:00 PM, René Scharfe l@web.de wrote: Am 29.09.2013 04:56, schrieb Wataru Noguchi: Hi, Thanks for comments. My currently working repository is https://github.com/wnoguchi/git/tree/hotfix/mingw-multibyte-path-checkout-failure I have revert commits to 1f10da3.

Re: [msysGit] [PATCH] mingw-multibyte: fix memory acces violation and path length limits.

2013-09-29 Thread Stefan Beller
On 09/29/2013 04:56 AM, Wataru Noguchi wrote: - gcc optimization level is O2.(fail) - gcc O0, O1 works fine. Maybe you could try to compile with STACK found at http://css.csail.mit.edu/stack/ That tool is designed to find Optimization-unstable code. signature.asc Description: OpenPGP

[PATCH] mingw-multibyte: fix memory acces violation and path length limits.

2013-09-28 Thread Wataru Noguchi
fix: Git for Windows crashes when clone Japanese multibyte repository. Reproduce condition: - Japanese Base Encoding is Shift-JIS. - It happens Japanese multibyte directory name and too-long directory path - Linux(ex. Ubuntu 13.04 amd64) can clone normally. - example repository is here: git

Re: [msysGit] [PATCH] mingw-multibyte: fix memory acces violation and path length limits.

2013-09-28 Thread Johannes Schindelin
Hi, On Sun, 29 Sep 2013, Wataru Noguchi wrote: --- a/convert.c +++ b/convert.c @@ -724,6 +724,11 @@ static void convert_attrs(struct conv_attrs *ca, const char *path) { int i; static struct git_attr_check ccheck[NUM_CONV_ATTRS]; + + if (NUM_CONV_ATTRS != 0) { +