From: Chris S. <ir0...@gm...> - 2012-06-29 11:04:00
|
On 28 June 2012 23:52, Cesar Strauss wrote: > On 6/19/2012 12:59 AM, Cesar Strauss wrote: >> It seems gcc 4.7.0 miscompiles the startup code. I'm experiencing a >> crash every time I run a minimal "do nothing" application compiled with >> gcc 4.7.0 and the new runtime. > > The crash occurs in __dyn_tls_init (tlssup.c). I found it by setting a > breakpoint in __mingw_CRTStartup() and executing the startup code > (compiled with optimizations) line by line. > > Looking at the function in CVS, I see that it was updated since the last > release. In particular, one of the changes included this comment: > > /* Use the nfuncs variable to iterate the TLS functions instead of pfunc > to avoid nasty compiler optimizations when comparing two global pointers. */ > > In fact, the CVS version of the mingwrt no longer crashes when compiled > with optimizations in gcc 4.7.0. Excellent, thank you for taking the time to dig into this. > So, the choices are: > > 1) A new '-2' release of the existing version, with the startup code > built with '-O0', as suggested by Greg; > > 2) A new '-2' release of the existing version, with the following patch > applied: > > http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/mingw/tlssup.c.diff?r1=1.4&r2=1.5&cvsroot=src > > 3) A new release from CVS. > > My personal preference is 3, followed by 2, then 1. Agreed, I will focus on creating a new mingwrt release based on CVS. I'll also do a sweep of the bug reports, patches, etc. prior to making the release. I should hopefully have it out in about a week. Thank you, Chris -- Chris Sutcliffe http://emergedesktop.org http://www.google.com/profiles/ir0nh34d |