bombomby / optick

C++ Profiler For Games
https://optick.dev
MIT License
2.92k stars 293 forks source link

Exceptions not caught at C API boundary #119

Open raintherrien opened 3 years ago

raintherrien commented 3 years ago

This library does appear to use exceptions to propagate errors, it uses STL containers, but there is no exception handling performed in optick_capi.cpp. If the intent of optick_capi.h is to provide C linkage then any error would result in undefined behavior.

Perhaps that's not the purpose of this header. If not, could there be e.g. a CMake option to exit on error so that it works without UB?