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

Re: Re: [PATCH] git-compat-util.h: reduce optimization level to 1 on MinGW env.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 25, 2013, 19:50 UTC
Message-ID
<alpine.DEB.1.00.1309252142220.1191@s15462909.onlinehome-server.info>
In-Reply-To
<20130925191527.GY9464@google.com>
Hi,
On Wed, 25 Sep 2013, Jonathan Nieder wrote:
Show 9 quoted lines
> Wataru Noguchi wrote:
> 
> >   - actually file name is decoded.]
> >   %E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%201-long-long-long-dirname/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%202-long-long-long-dirname/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%203-long-long-long-dirname/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%204-long-long-long-dirname/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%205-long-long-long-dirname/%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB%E3%81%8A%E8%AA%AD%E3%81%BF%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84.txt
> >
> > This commit reduce gcc optimization level from O2 to O1 when MinGW
> > Windows environment.
> 
> Do you know why reducing the optimization level avoids a crash?

I suspect that the optimization level causes smaller (or no) buffer bytes between data structures and the crash is the symptom of a buffer overflow. In that light, I think that reducing the optimization level is most likely just working around this particular issue, and other scenarios might still crash until we fix the underlying bug.

Most likely the problem is with our Windows-specific UTF-8 handling, I would not be surprised if it is my "favorite" bug: an off-by-one.

To find out what the real cause is, I suggest using a tool similar to valgrind. Valgrind does not run on Windows, but I DuckDuckWent e.g. http://code.google.com/p/drmemory/ as an alternative that could be tried to identify the problem.

Ciao, Johannes

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Previous: Jonathan NiederNext: Wataru Noguchi
Message 3 of 6 in “git-compat-util.h: reduce optimization level to 1 on MinGW env.”
  1. git-compat-util.h: reduce optimization level to 1 on MinGW env.Wataru Noguchi, Sep 25, 2013
  2. Jonathan NiederSep 25, 2013
  3. Johannes SchindelinSep 25, 2013
  4. Wataru NoguchiSep 25, 2013
  5. Wataru NoguchiSep 26, 2013
  6. Wataru NoguchiSep 25, 2013

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.