-
Notifications
You must be signed in to change notification settings - Fork 177
Segmentation fault in MockImpl::unmocked() when compiled with mingw64 #362
Copy link
Copy link
Open
Description
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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels