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)
3. [mingw] #39268: g++ -O1 produces crashing code when accessing
dlls via LoadLibrary()/GetProcAddress()/reinterpret_cast
(MinGW Notification List)
4. [mingw] #39268: g++ -O1 produces crashing code when accessing
dlls via LoadLibrary()/GetProcAddress()/reinterpret_cast
(MinGW Notification List)
5. [mingw] #39268: g++ -O1 produces crashing code when accessing
dlls via LoadLibrary()/GetProcAddress()/reinterpret_cast
(MinGW Notification List)
6. [mingw] #39268: g++ -O1 produces crashing code when accessing
dlls via LoadLibrary()/GetProcAddress()/reinterpret_cast
(MinGW Notification List)
7. [mingw] #39268: g++ -O1 produces crashing code when accessing
dlls via LoadLibrary()/GetProcAddress()/reinterpret_cast
(MinGW Notification List)
----------------------------------------------------------------------
Message: 1
Date: Thu, 30 May 2019 19:26:54 +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-05-30 19:26
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-05-30 19:26 Updated by: comer352l
* New Ticket "g++ -O1 produces crashing code when accessing dlls via
LoadLibrary
()/GetProcAddress()/reinterpret_cast" created
---------------------------------------------------------------------
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: Thu, 30 May 2019 19:40:11 +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-05-30 19:40
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-05-30 19:40 Updated by: comer352l
Comment:
Unfortunately, the dll I'm using in the example code is too large to attach it
(1.7MB).
Should work with any other dll (adjusting dll name, function names and
prototypes).
---------------------------------------------------------------------
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: 3
Date: Thu, 30 May 2019 19:43:16 +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-05-30 19:43
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-05-30 19:43 Updated by: comer352l
Comment:
Tested operating Systems: Windows 7 64bit, Windows XP 32bit
Tested MinGW versions:
MinGW/gcc 4.8.2 (i686-posix-dwarf-rev3, Built by MinGW-W64 project)
MinGW/gcc 7.3.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)
---------------------------------------------------------------------
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: 4
Date: Thu, 30 May 2019 19:04:11 +0100
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 18:26
Last Update: 2019-05-30 19:04
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-05-30 19:04 Updated by: keith
Comment:
Reply To comer352l
Unfortunately, the dll I'm using in the example code is too large to attach
it (1.7MB).
Hmm. I was just about to ask where that DLL originates.
Should work with any other dll (adjusting dll name, function names and
prototypes).
Well, if you want us to investigate, you really need to provide a fully
self-contained test case. Don't expect us to work around your omissions — you
need to either:–
• adapt your test case, to work with one of the system DLLs, or
• provide a reduced sample DLL — ideally in source form — within your test
case, on which it operates.
---------------------------------------------------------------------
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: 5
Date: Thu, 30 May 2019 19:17:22 +0100
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 18:26
Last Update: 2019-05-30 19:17
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-05-30 19:17 Updated by: keith
Comment:
Reply To comer352l
Tested operating Systems: Windows 7 64bit, Windows XP 32bit
Tested MinGW versions:
MinGW/gcc 4.8.2 (i686-posix-dwarf-rev3, Built by MinGW-W64 project)
MinGW/gcc 7.3.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)
Products from the MinGW-W64 project — a project which gratuitously (and
illegally) infringes our registered trademark — do not originate, and are not
supported here. Notwithstanding, if you can provide a self-contained test case,
I'd be interested to see if the same problem is reproduced with our official
MinGW compiler suite.
Do please note that your c0000005 exception code is a SEGFAULT, ("access
violation" in Microsoft parlance). This means that your program is attempting
to access memory to which it does not have access rights. Likely causes are
references to an uninitialized pointer, or to memory which has already been
deallocated; usually these are the result of errors in the user program code,
but unless you do provide a fully self-contained test case, I am not willing to
investigate further.
---------------------------------------------------------------------
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: 6
Date: Thu, 30 May 2019 21:05:06 +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-05-30 21:05
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-05-30 21:05 Updated by: comer352l
Comment:
Reply To keith
Reply To comer352l Well, if you want us to investigate, you really need to
provide a fully self-contained test case. Don't expect us to work around
your omissions — you need to either:–
Sure, I'm working on it.
* adapt your test case, to work with one of the system DLLs, or
Any suggestions ? Windows is not my "native" environment...
What's the maximum attachment size ?
---------------------------------------------------------------------
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: 7
Date: Thu, 30 May 2019 21:10:20 +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-05-30 21:10
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-05-30 21:10 Updated by: comer352l
Comment:
Reply To keith
Reply To comer352l Products from the MinGW-W64 project — a project which
gratuitously (and illegally) infringes our registered trademark — do not
originate, and are not supported here.
I didn't know that, sorry.
I was just testing with the versions that came with Qt4/5.
I'll go and switch over to the original.
Do please note that your c0000005 exception code is a SEGFAULT, ("access
violation" in Microsoft parlance). This means that your program is
attempting to access memory to which it does not have access rights. Likely
causes are references to an uninitialized pointer, or to memory which has
already been deallocated; usually these are the result of errors in the
user program code, but unless you do provide a fully self-contained test
case, I am not willing to investigate further.
I know. But I'm pretty sure the code is correct.
---------------------------------------------------------------------
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
------------------------------
Subject: Digest Footer
_______________________________________________
MinGW-Notify mailing list
[email protected]
https://lists.osdn.me/mailman/listinfo/mingw-notify
------------------------------
End of MinGW-Notify Digest, Vol 20, Issue 8
*******************************************