public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/104703] New: GNAT 11.2 exception traceback output is mostly garbled on Intel x64 (MSYS2)
@ 2022-02-26 17:23 cthowie at netzero dot net
2022-03-24 10:08 ` [Bug ada/104703] " ebotcazou at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: cthowie at netzero dot net @ 2022-02-26 17:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104703
Bug ID: 104703
Summary: GNAT 11.2 exception traceback output is mostly garbled
on Intel x64 (MSYS2)
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: cthowie at netzero dot net
Target Milestone: ---
PLATFORM: GCC 11.2 Revision 8 toolchain for MSYS2 on Windows 10 Intel x64 CPU.
Note GNAT FSF 8.2 Revision 1 compiler does NOT have the problem as shown below.
ISSUE: I upgraded from GNAT FSF 8.2 to GNAT FSF 11.2 and noticed the
"traceback" output is now garbled as demonstrated below with a trivial Ada
program:
EXAMPLE PROGRAM DEMONSTRATING THE ISSUE:
procedure Main
is
procedure Inner with No_Inline is
begin
raise Program_Error;
end Inner;
begin
Inner;
end Main;
BUILD INSTRUCTIONS:
Save the above example program to e.g., "main.adb" then run:
gnatmake -g main.adb -bargs -Es
so we get symbolic traceback for the raised exception. Then run the 'main.exe'
from the command line. I get this broken trace (only the bottom 4 lines for
KERNEL32.DLL and ntdll.dll are correct):
$ ./main
raised PROGRAM_ERROR : main.adb:8 explicit raise
[C:\temp\GNAT bug\main.exe]
0x7ff6ecbe1a1e ??? at ???
[C:\temp\GNAT bug\main.exe]
0x7ff6ecbe1a41 ??? at ???
[C:\temp\GNAT bug\main.exe]
0x7ff6ecbe1992 ??? at ???
[C:\temp\GNAT bug\main.exe]
0x7ff6ecbe13af ??? at ???
[C:\temp\GNAT bug\main.exe]
0x7ff6ecbe14e4 ??? at ???
[C:\windows\System32\KERNEL32.DLL]
0x7ffb5c5f81f2
[C:\windows\SYSTEM32\ntdll.dll]
0x7ffb5f05a24f
The trace is broken even:
1) if I bind with the "-Ea" binder flag
2) if I use the GNAT system package and Text_IO e.g.,
with GNAT.Traceback.Symbolic; use GNAT.Traceback.Symbolic;
and add this to the bottom of the main subprogram:
exception
when e : others => Put_Line (Symbolic_Traceback (e));
Note that the traceback is correct if I compile exactly as above but with GNAT
FSF 8.2 Revision 1 compiler for MSYS2:
raised PROGRAM_ERROR : main.adb:8 explicit raise
[C:\temp\GNAT bug\main.exe]
Main.Inner at main.adb:8
Main at main.adb:12
Main at b~main.adb:188
__tmainCRTStartup at crtexe.c:333
mainCRTStartup at crtexe.c:217
[C:\windows\System32\KERNEL32.DLL]
0x7ffb5c5f81f2
[C:\windows\SYSTEM32\ntdll.dll]
0x7ffb5f05a24f
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug ada/104703] GNAT 11.2 exception traceback output is mostly garbled on Intel x64 (MSYS2)
2022-02-26 17:23 [Bug ada/104703] New: GNAT 11.2 exception traceback output is mostly garbled on Intel x64 (MSYS2) cthowie at netzero dot net
@ 2022-03-24 10:08 ` ebotcazou at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2022-03-24 10:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104703
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.3
Status|UNCONFIRMED |RESOLVED
CC| |ebotcazou at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
This should be fixed in 11.3, in the meantime add -largs -no-pie.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-24 10:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-26 17:23 [Bug ada/104703] New: GNAT 11.2 exception traceback output is mostly garbled on Intel x64 (MSYS2) cthowie at netzero dot net
2022-03-24 10:08 ` [Bug ada/104703] " ebotcazou at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).