gcc-4.3.0 20080305-alpha: SIGSEGV in emutls_destroy() on exit

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

gcc-4.3.0 20080305-alpha: SIGSEGV in emutls_destroy() on exit

Uli Hertlein
Hi all,

has anyone else experienced a crash related to 'emutls_destroy()' on
exit from programs that use exceptions and are compiled with '-mthreads'?

I'm getting a popup at exit that says:
----------
The instruction at "0x004147af" referenced memory at "0x4f003139". The
memory could not be "read". Click on blahblah...
----------

gdb is giving me the following stack trace:
----------
Program received signal SIGSEGV, Segmentation fault.
0x004147af in emutls_destroy ()
(gdb) where
#0  0x004147af in emutls_destroy ()
#1  0x6fbc1313 in __mingwthr_run_key_dtors () from c:\mingw\bin\mingwm10.dll
#2  0x6fbc1358 in DllMain@12 () from c:\mingw\bin\mingwm10.dll
#3  0x6fbc10e6 in DllMainCRTStartup@12 () from c:\mingw\bin\mingwm10.dll
#4  0x7c9011a7 in ntdll!LdrSetAppCompatDllRedirectionCallback ()
    from C:\WINDOWS\system32\ntdll.dll
#5  0x6fbc0000 in ?? ()
#6  0x00000000 in ?? ()
----------

It works fine when compiling without '-mthreads' but this is not an
option for the application I'm working on as it uses threads heavily.

I've attached a demonstrator that reproduces the problem; it's only a
few lines of try/catch with a throw.

My environment is:
g++.exe (GCC) 4.3.0 20080305 (alpha-testing) mingw-20080502
binutils-2.18.50-20080109-2
mingwrt-3.15
w32api-3.12

--
Uli Hertlein
Research and Development   Phone: +61-3-9549-1122
XDT Pty Ltd                Web:   www.xdt.com.au

/*
 * thread/exception demonstrator
 *
 * compile:
 *      g++ -mthreads ex.cpp
 * then run 'a.exe'
 */

#include <iostream>
#include <exception>


int main(int argc, char** argv)
{
    std::cerr << "main starts..." << std::endl;
    try {
        throw std::exception();
    }
    catch (std::exception& ex) {
        std::cerr << "main caught '" << ex.what() << "'" << std::endl;
    }
    catch (...) {
        std::cerr << "main caught other" << std::endl;
    }

    std::cerr << "main returns..." << std::endl;
    return 0;
}

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: gcc-4.3.0 20080305-alpha: SIGSEGV in emutls_destroy() on exit

Uli Hertlein
Uli Hertlein wrote:
> has anyone else experienced a crash related to 'emutls_destroy()' on
> exit from programs that use exceptions and are compiled with '-mthreads'?
>...
> Program received signal SIGSEGV, Segmentation fault.
> 0x004147af in emutls_destroy ()
> (gdb) where
> #0  0x004147af in emutls_destroy ()

Hmmm, nothing?
Wrong mailing list?  Anything I missed? FAQ?

--
Uli Hertlein
Research and Development   Phone: +61-3-9549-1122
XDT Pty Ltd                Web:   www.xdt.com.au

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: gcc-4.3.0 20080305-alpha: SIGSEGV in emutls_destroy() on exit

Tim S
Uli Hertlein wrote:

> Uli Hertlein wrote:
>> has anyone else experienced a crash related to 'emutls_destroy()' on
>> exit from programs that use exceptions and are compiled with '-mthreads'?
>>...
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x004147af in emutls_destroy ()
>> (gdb) where
>> #0  0x004147af in emutls_destroy ()
>
> Hmmm, nothing?
> Wrong mailing list?  Anything I missed? FAQ?
>

It is an alpha build, so it crashes so what.

I myself use TDM 4.32 GCC build, the alpha build had several bugs in it.
I think most people are not using it.

Tim S


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: gcc-4.3.0 20080305-alpha: SIGSEGV in emutls_destroy() on exit

Uli Hertlein
Tim S wrote:
>>> Program received signal SIGSEGV, Segmentation fault.
>>> 0x004147af in emutls_destroy ()
>>> (gdb) where
>>> #0  0x004147af in emutls_destroy ()
>> Hmmm, nothing?
>> Wrong mailing list?  Anything I missed? FAQ?
>
> It is an alpha build, so it crashes so what.

I'm aware that it's alpha, just trying to figure out if reports like
this actually reaches the people working on it...

Cheers,
/uli

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: gcc-4.3.0 20080305-alpha: SIGSEGV in emutls_destroy() on exit

Earnie Boyd

Quoting Uli Hertlein <[hidden email]>:

> Tim S wrote:
>>>> Program received signal SIGSEGV, Segmentation fault.
>>>> 0x004147af in emutls_destroy ()
>>>> (gdb) where
>>>> #0  0x004147af in emutls_destroy ()
>>> Hmmm, nothing?
>>> Wrong mailing list?  Anything I missed? FAQ?
>>
>> It is an alpha build, so it crashes so what.

Reports like this are great so that the developer knows 1) Someone is
using his work and 2) someone cares enough to report issues.

>
> I'm aware that it's alpha, just trying to figure out if reports like
> this actually reaches the people working on it...
>

The developers watch this list.  You may want to look at
http://gcc.gnu.org/bugs.html though.

Thanks for your concern,
Earnie

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users