Skip to content

Commit 91883ed

Browse files
cole-hedolstra
andcommitted
lookup throw only once
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
1 parent 62b4693 commit 91883ed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/libmain/shared.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,6 @@ void __cxa_throw(void * exc, void * tinfo_, void (*dest)(void *))
419419
if (*tinfo == typeid(std::logic_error))
420420
abort();
421421

422-
auto orig_cxa_throw = (cxa_throw_type) dlsym(RTLD_NEXT, "__cxa_throw");
422+
static auto orig_cxa_throw = (cxa_throw_type) dlsym(RTLD_NEXT, "__cxa_throw");
423423
orig_cxa_throw(exc, tinfo_, dest);
424424
}

0 commit comments

Comments
 (0)