-
Notifications
You must be signed in to change notification settings - Fork 81
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
register_terminate_handler
fails on MSVC
, when default call convention is not __cdecl
#197
Comments
Hi, That could cause a lot of problems even beyond the terminate handler, pretty much any time cpptrace passes a function pointer (set_terminate, |
Hey, Greetings |
Thanks for the thoughtful reply. I can look into this more this week. If this is something easy to do on the cpptrace side of things I think it may as well be done. |
I've gone ahead and added |
Cool, thank you! |
Hello,
I've encountered a rather niche issue. I'm currently working on an integration of
cpptrace
into my mocking framework mimic++, which has support for arbitrary call conventions.In my ci/cd build I've one build with an alternative default call convention enabled (
/Gv
switch =>__vectorcall
), which is set viaCXXFLAGS
. This requirescpptrace
to compile with that convention, too. Unfortunately thecorecrt_terminate.h
requires the terminate handler explicitly to use the__cdecl
call convention, which then results in a compilation error inutils.cpp, register_terminate_handler
.Definition in
corecrt_terminate.h
:typedef void (__CRTDECL* terminate_handler )(void);
I don't know whether other compilers support alternative default call conventions too and if they have the same requirement for the terminate handler. But maybe we can somehow workaround this?
EDIT: Here is the link to the relevant run:
https://github.com/DNKpp/mimicpp/actions/runs/12467234585/job/34796176790?pr=85
The text was updated successfully, but these errors were encountered: