This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In <algorithm> | |
// Declare an inline/weak variable. | |
extern void (*ExtremelyHackyCallThatYouWillNotOverride)() | |
__attribute__((weak)) = nullptr; | |
// ... | |
// Before the sort call | |
// ... | |
if (ExtremelyHackyCallThatYouWillNotOverride) | |
ExtremelyHackyCallThatYouWillNotOverride(); | |
_VSTD::__sort<_Comp_ref>(_VSTD::__unwrap_iter(__first), _VSTD::__unwrap_iter(__last), _Comp_ref(__comp)); | |
// ... | |
// main.cpp | |
#include <algorithm> | |
// Prints the stacktrace. | |
void backtrace_dumper(); | |
int main(int argc, char** argv) { | |
ExtremelyHackyCallThatYouWillNotOverride = &backtrace_dumper; | |
return InvokeRealMain(argc, argv); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment