Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-100553

MinGW 9.0.0: boost stacktrace behavior different than in earlier versions / other releases

    XMLWordPrintable

    Details

    • Platform/s:
      Windows

      Description

      In a simple application:

      #include <boost/stacktrace.hpp>
      #include <iostream>
      int main()
      {    
      std::cout << boost::stacktrace::stacktrace();    
      return 0;
      }
      

      the stacktrace in the output is missing proper line numbers and source file names when building with MinGW 9.0.0 shipped with Qt. In the meanwhile with earlier versions such as 8.1.0 or with other releases of 9.0.0 (e.g. msys) the same problem does not occur and the line numbers etc are present in the output.

      Build and app output with MinGW 9.0.0:

      C:\test_dir>C:\Qt\Tools\mingw900_64\bin\g++.exe -IC:\boost_install\include\boost-1_78 -IC:\Git\libbacktrace -DBOOST_STACKTRACE_USE_BACKTRACE -g main.cpp -LC:\Git\libbacktrace\.libs -lbacktrace -o test.exe
      
      C:\test_dir>test
       0# register_frame_ctor in C:\test_dir\test.exe
       1# register_frame_ctor in C:\test_dir\test.exe
       2# register_frame_ctor in C:\test_dir\test.exe
       3# register_frame_ctor in C:\test_dir\test.exe
       4# register_frame_ctor in C:\WINDOWS\System32\KERNEL32.DLL
       5# register_frame_ctor in C:\WINDOWS\SYSTEM32\ntdll.dllC:\test_dir>
      

      Build and app output with MinGW 8.1.0:

      C:\test_dir>C:\Qt\Tools\mingw810_64\bin\g++.exe -IC:\boost_install\include\boost-1_78 -IC:\Git\libbacktrace -DBOOST_STACKTRACE_USE_BACKTRACE -g main.cpp -LC:\Git\libbacktrace\.libs -lbacktrace -o test.exe
      
      C:\test_dir>test
       0# boost::stacktrace::basic_stacktrace<std::allocator<boost::stacktrace::frame> >::init(unsigned long long, unsigned long long) at C:/boost_install/include/boost-1_78/boost/stacktrace/stacktrace.hpp:76
       1# main at C:\test_dir/main.cpp:5
       2# __tmainCRTStartup in C:\test_dir\test.exe
       3# mainCRTStartup in C:\test_dir\test.exe
       4# register_frame_ctor in C:\WINDOWS\System32\KERNEL32.DLL
       5# register_frame_ctor in C:\WINDOWS\SYSTEM32\ntdll.dll
      

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              qtbuildsystem Qt Build System Team
              Reporter:
              miikapernu Miika Pernu
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes