Skip to content

Commit

Permalink
fixes bug
Browse files Browse the repository at this point in the history
  • Loading branch information
actboy168 committed May 20, 2024
1 parent 3ae34fb commit 9fcbf26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion bee/win/crash/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ namespace bee::crash {
DWORD code = exinfo->ExceptionRecord->ExceptionCode;
LONG action;
bool success = false;
if ((code != EXCEPTION_BREAKPOINT) && (code != EXCEPTION_SINGLE_STEP) && (code != DBG_PRINTEXCEPTION_C) && (code != DBG_PRINTEXCEPTION_WIDE_C)) {
#if defined(_MSC_VER) && !defined(__clang__)
bool is_debug_exception = (code == EXCEPTION_BREAKPOINT) || (code == EXCEPTION_SINGLE_STEP) || (code == DBG_PRINTEXCEPTION_C) || (code == DBG_PRINTEXCEPTION_WIDE_C);
#else
bool is_debug_exception = false;
#endif
if (!is_debug_exception) {
success = current_handler->notify_write_dump(exinfo);
}
if (success) {
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static int loadfile(lua_State *L, const fs::path &filename, const char *chunknam
return status;
}

#if defined(_WIN32)
#if defined(_WIN32) && !defined(__SANITIZE_ADDRESS__)
# include <bee/win/crash/handler.h>
static bee::crash::handler handler(L".");
#endif
Expand Down

0 comments on commit 9fcbf26

Please sign in to comment.