You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to use catch to perform unit testing for an embedded target running on a microblaze processor. I'm testing using QEMU and using gcc version 4.6.4 (20120924). I've provided my unit test code as well as the backtrace of the call tree immediately prior to the sigsegv.
/*
- Unit test application written for testing within QEMU
*/
#define CATCH_CONFIG_RUNNER // This tells Catch that we will provide a main() - ONLY PROVIDE THIS ONCE!!!
#include "catch.hpp"
# include <iostream>
# include <string>
# include <memory> // unique_ptr
int main( int argc, char\* const argv[] )
{
int result = Catch::Session().run( argc, argv );
return result;
}
SCENARIO( "test the UT framework under qemu", "[CATCH]" )
{
GIVEN( "UT has started" )
{
REQUIRE( (1 == 1) );
}
}
Here's the stack trace under gdb:
> # 0 Catch::FreeFunctionTestCase::invoke (this=0x1019abc8)
>
>
> at ../deps/include/catch.hpp:5810
>
> # 1 0x100090c0 in Catch::TestCase::invoke (this=0x1019c208)
>
>
> at ../deps/include/catch.hpp:6715
>
> # 2 0x100251fc in Catch::RunContext::invokeActiveTestCase (this=0xbffffa28)
>
>
> at ../deps/include/catch.hpp:5412
>
> # 3 0x10024dfc in Catch::RunContext::runCurrentTest (this=0xbffffa28, redirectedCout=..., redirectedCerr=...)
>
>
> at ../deps/include/catch.hpp:5384
>
> # 4 0x100230d4 in Catch::RunContext::runTest (this=0xbffffa28, testCase=...)
>
>
> at ../deps/include/catch.hpp:5223
>
> # 5 0x10025ad8 in Catch::Runner::runTests (this=0xbffffb38)
>
>
> at ../deps/include/catch.hpp:5543
>
> # 6 0x100272cc in Catch::Session::run (this=0xbffffcbc)
>
>
> at ../deps/include/catch.hpp:5670
>
> # 7 0x10027000 in Catch::Session::run (this=0xbffffcbc, argc=1, argv=0xbffffe04)
>
>
> at ../deps/include/catch.hpp:5650
>
> # 8 0x10011738 in main (argc=1, argv=0xbffffe04) at ../UnitTest/unitTest.cpp:26
>
> (gdb) n
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000008 in ?? ()
> (gdb) bt
> # 0 0x00000008 in ?? ()
> # 1 0x00000008 in ?? ()
>
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
> (gdb)
> # 0 0x00000008 in ?? ()
> # 1 0x00000008 in ?? ()
The text was updated successfully, but these errors were encountered:
Since it has been ~5 months without new information, I am going to close this issue. If someone manages to reliably reproduce this with latest Catch, please open a new issue and link this one.
I'm attempting to use catch to perform unit testing for an embedded target running on a microblaze processor. I'm testing using QEMU and using gcc version 4.6.4 (20120924). I've provided my unit test code as well as the backtrace of the call tree immediately prior to the sigsegv.
Here's the stack trace under gdb:
The text was updated successfully, but these errors were encountered: