-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault with binutils 2.28.1 #23
Comments
I'm currently doing some changes regarding the CLI, might be a regression. Last time I worked on the tag editor I didn't noticed that bug (using Clang 5.0 and GCC 7.2). Could you do a debug build to determine in which line the segfault occurs? |
The debug build does the same thing? even with no arguments:
also I dont know if it is recent change - I tried these versions with same result:
|
This makes things easier. Issues which only occur in release builds are hard to track. You need to run the program with the debugger. Since you're using GCC, gdb is your tool. See https://stackoverflow.com/questions/2876357/determine-the-line-of-c-code-that-causes-a-segmentation-fault for an example. Or you can just use an IDE like Qt Creator if you don't like to fiddle with gdb directly. Thanks for the extensive testing. If it is reproducible with all those versions it is not due to my latest changes (at least not the latest changes in the tageditor repository). Hard to tell something more specific without having debug info, though. |
Here you go
|
So it fails directly in |
My own build, compiled with GCC 7.2, binutils 2.29, and mingw-w64 (CRT, headers, winpthreads) 5.0.2 works (tested under Windows 10 and Wine): https://martchus.no-ip.biz/repo/win/static/devel/tageditor-devel-2.2.5-319.3525588-static-x86_64-w64-mingw32.tar.xz I suppose a simple CLI application using io streams from C++ standard library (std::cout, std::cerr) built using your version of GCC, binutils and mingw-w64 works? I just have to ask because such errors in Windows version of GCC/binutils and mingw-w64 are not uncommon, eg. If the problem is caused by my code, I suspect |
@Martchus thanks for that, but that build really isnt germane, because yours has QT - hence it would never have a chance of triggering the error I have To really "put the ball back in my court" - you would need a working build that uses binutils 2.28.1 - |
Initially, you said the error would also occur when using the CLI, eg.
In this case it makes no difference whether Qt is enabled or not and of course I tested that case with my binary (extra for you with the crappy cmd.exe). The issue is likely called by the two mentioned functions and maybe by using the standard IO streams. In the last case it is likely caused by the Windows version of GCC (likely libstdc++ in particular). I'm not taking the effort to test with old GCC versions for finding bugs which are likely outside of the scope of this project (as the bugs mentioned in the last comment). But as far as I remember I was able to produce correct Windows builds using GCC 6.2 and GCC 6.3 (in contrast to GCC 6.1). However, the issues depended on various things such as CPU architecture (i686 vs. x86_64) and optimization flags. You could at least try to play around with optimization flags. And does a simple CLI application using io streams from C++ standard library (std::cout, std::cerr) with your version of GCC work? Shouldn't take long to find out. |
No, because that will give a different backtrace:
|
The backtrace is different, but it show the same issue: It dies when trying to print something the first time via std::cout. Still, the two mentioned (Windows specific functions) might cause the issue or your tool chain. So does a simple CLI application using io streams from C++ standard library (std::cout, std::cerr) with your version of GCC work? And does it work if you disabled those functions as described in the previous comment? |
Here you go:
|
So this is a problem in your toolchain - likely I'm also still wondering whether maybe just your GCC package is broken, because I can't remember such a severe bugs when using GCC 6.3 myself. |
Ok, so we know at least what causes this issue in particular. Note that when I had been using mingw-w64-binutils 2.28 (before recent update to 2.29) I didn't encounter this issue. I never tried 2.28.1. |
this is fixed with new version of binutils |
Using these build scripts:
and with this file (regionsAllowed=DE,US):
I am getting this error when building with binutils 2.28.1:
Note that building with binutils 2.25.0 works as expected:
The text was updated successfully, but these errors were encountered: