This code crashes when compiled with [mingw64, Windows 11, gcc v15.2.0] but correctly throws an exception on [ubuntu 22.04, gcc 13.0.0]. AFAIK, both are compiled with the same set of flags.
The crash occurs on the fakeit.handle(event); in the unmocked() method:
void unmocked() {
ActualInvocation<> invocation(Invocation::nextInvocationOrdinal(), UnknownMethod::instance());
UnexpectedMethodCallEvent event(UnexpectedType::Unmocked, invocation);
auto &fakeit = getMockImpl(this)->_fakeit;
fakeit.handle(event);
std::string format = fakeit.format(event);
UnexpectedMethodCallException e(format);
throw e;
}
Debugger shows fakeit with a zero address on mingw64?
Is there some magic compiler flag that should be applied on mingw64?
This code crashes when compiled with
[mingw64, Windows 11, gcc v15.2.0]but correctly throws an exception on[ubuntu 22.04, gcc 13.0.0]. AFAIK, both are compiled with the same set of flags.The crash occurs on the
fakeit.handle(event);in theunmocked()method:Debugger shows
fakeitwith a zero address on mingw64?Is there some magic compiler flag that should be applied on
mingw64?