-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
A simple testcase causes Segmentation Fault. #1626
Comments
Note: If I change line 9 to TEST_CASE("literal _format", "[format]") { Then it's working well. |
Well, this is interesting. The problem is that
However, on Linux, reporting the error fails because it attempts to use console colours for the output, but doing so fails -- at a quick glance, at this point the colours objects are not yet initialized . |
I am having a problem at some similar location at |
@DirkGehlich looking at the @recolic In your case i suspect that the output stream is not yet created. |
The VMs we are using are vagrant boxes which use VirtualBox. VirtualBox: v5.2.26 Do you need more information? Can we do some tests within our boxes to help you identify the issue? EDIT: Tested also in a VMware box (same OS). Problem is the same, so it looks like a general virtual machine issue. |
e680c4b fixed the colour output in startup exception case. @DirkGehlich thinking what would help. Do you have some crash dump? If you can provide some minimal repro code i can try to check what is happening. Will try to check with my Windows 10 virtual machine. |
So I was debugging and trying to find out whats the issue, which is quite tough. I noticed that the platform colour instance methods will not be called at all in release mode, but in debug. |
@DirkGehlich Removing static init sounds like either there is a serious UB in the code on our side (the code is small and simple enough that I think this is unlikely), or a serious problem in your compilation setup. I've thought about it, and I am going to merge the PR that adds the defensive check, because practicality sometimes trumps purity, but I am not particularly happy about it. |
Describe the bug
A simple testcase causes Segmentation Fault.
Expected behavior
It should run without segmentation fault. The tests may pass or fail or segfault, but
catch
should not crash.Reproduction steps
I wrote a simple testcase with latest catch.hpp:
And compile it with
Then run
src/string_14
, gotfish: 'src/string_14' terminated by signal SIGSEGV (Address boundary error)
.Platform information:
Additional context
GDB backtrace:
The text was updated successfully, but these errors were encountered: