Skip to content

Commit 6975337

Browse files
committed
fixes
1 parent 0b7c62a commit 6975337

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

cli/jl_exports.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ JL_CODEGEN_EXPORTED_FUNCS(XX)
4242
JL_RUNTIME_EXPORTED_FUNCS(XX)
4343
#ifdef _OS_WINDOWS_
4444
JL_RUNTIME_EXPORTED_FUNCS_WIN(XX)
45-
JL_HIDDEN anonfunc * __julia_personality_addr = NULL;
45+
JL_DLLEXPORT anonfunc * __julia_personality_addr = NULL;
4646
#endif
4747
JL_CODEGEN_EXPORTED_FUNCS(XX)
4848
#undef XX
@@ -57,7 +57,11 @@ static const char *const jl_runtime_exported_func_names[] = {
5757
JL_RUNTIME_EXPORTED_FUNCS(XX)
5858
#ifdef _OS_WINDOWS_
5959
JL_RUNTIME_EXPORTED_FUNCS_WIN(XX)
60+
#ifdef _WIN32
6061
"__julia_personality@16",
62+
#else
63+
"__julia_personality",
64+
#endif
6165
#endif
6266
JL_RUNTIME_EXPORTED_FUNC_ADDRS(XX)
6367
NULL

src/debuginfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ class JuliaJITEventListener: public JITEventListener
342342
!memcmp(UnwindData, "\0\0\0\0\0\0\0\0\0\0\0\0", 12));
343343
catchjmp[0] = 0x48;
344344
catchjmp[1] = 0xb8; // mov RAX, QWORD PTR [&__julia_personality]
345-
*(uint64_t*)(&catchjmp[2]) = (uint64_t)&__julia_personality;
345+
*(uint64_t*)(&catchjmp[2]) = (uint64_t)__julia_personality_addr;
346346
catchjmp[10] = 0xff;
347347
catchjmp[11] = 0xe0; // jmp RAX
348348
UnwindData[0] = 0x09; // version info, UNW_FLAG_EHANDLER

src/jl_exported_funcs.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
XX(jl_apply_type) \
1818
XX(jl_apply_type1) \
1919
XX(jl_apply_type2) \
20+
XX(jl_apply_modify_type) \
2021
XX(jl_argument_datatype) \
2122
XX(jl_argument_method_table) \
2223
XX(jl_array_cconvert_cstring) \
@@ -577,6 +578,7 @@
577578
XX(jl_dlfind_win32) \
578579
XX(jl_refresh_dbg_module_list)
579580

581+
// exported functions whose addresses we need to use
580582
#define JL_RUNTIME_EXPORTED_FUNC_ADDRS(XX) \
581583
XX(jl_f_is) \
582584
XX(jl_f_typeof) \

src/julia_internal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,8 +949,9 @@ typedef struct {
949949
uint64_t jl_getUnwindInfo(uint64_t dwBase);
950950
#ifdef _OS_WINDOWS_
951951
#include <dbghelp.h>
952-
JL_DLLEXPORT EXCEPTION_DISPOSITION __julia_personality(
952+
JL_DLLEXPORT EXCEPTION_DISPOSITION NTAPI __julia_personality(
953953
PEXCEPTION_RECORD ExceptionRecord, void *EstablisherFrame, PCONTEXT ContextRecord, void *DispatcherContext);
954+
JL_DLLIMPORT EXCEPTION_DISPOSITION (*__julia_personality_addr)(PEXCEPTION_RECORD, void*, PCONTEXT, void*);
954955
extern HANDLE hMainThread;
955956
typedef CONTEXT bt_context_t;
956957
#if defined(_CPU_X86_64_)

0 commit comments

Comments
 (0)