Send MinGW-Notify mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.osdn.me/mailman/listinfo/mingw-notify
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-Notify digest..."
Please do not reply to this notification; the sender address is unable to
accept incoming e-mail. If you wish to unsubscribe you can do so at
https://lists.osdn.me/mailman/listinfo/mingw-notify.
Today's Topics:
1. [mingw] #39268: g++ -O1 produces crashing code when accessing
dlls via LoadLibrary()/GetProcAddress()/reinterpret_cast
(MinGW Notification List)
2. [mingw] #39268: g++ -O1 produces crashing code when accessing
dlls via LoadLibrary()/GetProcAddress()/reinterpret_cast
(MinGW Notification List)
----------------------------------------------------------------------
Message: 1
Date: Sun, 02 Jun 2019 15:01:58 +0200
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #39268: g++ -O1 produces crashing code
when accessing dlls via
LoadLibrary()/GetProcAddress()/reinterpret_cast
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
#39268: g++ -O1 produces crashing code when accessing dlls via
LoadLibrary()/GetProcAddress()/reinterpret_cast
Open Date: 2019-05-30 19:26
Last Update: 2019-06-02 15:01
URL for this Ticket:
https://osdn.net//projects/mingw/ticket/39268
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39268
---------------------------------------------------------------------
Last Changes/Comment on this Ticket:
2019-06-02 15:01 Updated by: comer352l
Comment:
After reading a bit more about calling conventions and the GNU compiler
specifics, I think I can't blame the compiler for doing anything wrong here.
Looks like __stdcall has always been needed and it was just *BIG* luck that it
has been working fine without it for such a long time.
So I'm revoking this bug report, sorry for the noise.
---------------------------------------------------------------------
Ticket Status:
Reporter: comer352l
Owner: (None)
Type: Issues
Status: Open
Priority: 5 - Medium
MileStone: (None)
Component: (None)
Severity: 5 - Medium
Resolution: None
---------------------------------------------------------------------
Ticket details:
I'm investigating the following crash, which occurs when accessing a dll via
LoadLibrary(), getProcAddress(), reinterpret_cast:
Problem signature:
Problem Event Name: BEX
Application Name: test.exe
...
Fault Module Name: StackHash_0a9e
...
Exception Offset: 0028fe9c
Exception Code: c0000005
Exception Data: badc0de1
...
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
The code only crashes if it is compiled with -O1 (-O2, ...).
Moving around pieces of the code seems to fix the issue.
I was finally able to create some reduced example code with working / non
working variants (attachment follows).
--
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN
Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net
URL for this Ticket:
https://osdn.net/projects/mingw/ticket/39268
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39268
------------------------------
Message: 2
Date: Sun, 02 Jun 2019 15:02:30 +0200
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #39268: g++ -O1 produces crashing code
when accessing dlls via
LoadLibrary()/GetProcAddress()/reinterpret_cast
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
#39268: g++ -O1 produces crashing code when accessing dlls via
LoadLibrary()/GetProcAddress()/reinterpret_cast
Open Date: 2019-05-30 19:26
Last Update: 2019-06-02 15:02
URL for this Ticket:
https://osdn.net//projects/mingw/ticket/39268
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39268
---------------------------------------------------------------------
Last Changes/Comment on this Ticket:
2019-06-02 15:02 Updated by: comer352l
* Status Update from Open to Closed
* Resolution Update from None to Invalid
---------------------------------------------------------------------
Ticket Status:
Reporter: comer352l
Owner: (None)
Type: Issues
Status: Closed
Priority: 5 - Medium
MileStone: (None)
Component: (None)
Severity: 5 - Medium
Resolution: Invalid
---------------------------------------------------------------------
Ticket details:
I'm investigating the following crash, which occurs when accessing a dll via
LoadLibrary(), getProcAddress(), reinterpret_cast:
Problem signature:
Problem Event Name: BEX
Application Name: test.exe
...
Fault Module Name: StackHash_0a9e
...
Exception Offset: 0028fe9c
Exception Code: c0000005
Exception Data: badc0de1
...
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
The code only crashes if it is compiled with -O1 (-O2, ...).
Moving around pieces of the code seems to fix the issue.
I was finally able to create some reduced example code with working / non
working variants (attachment follows).
--
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN
Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net
URL for this Ticket:
https://osdn.net/projects/mingw/ticket/39268
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39268
------------------------------
Subject: Digest Footer
_______________________________________________
MinGW-Notify mailing list
[email protected]
https://lists.osdn.me/mailman/listinfo/mingw-notify
------------------------------
End of MinGW-Notify Digest, Vol 21, Issue 2
*******************************************