Skip to content

Commit

Permalink
Add dynamic_fn_ptr attribute to dynamic fn ptrs in M4A
Browse files Browse the repository at this point in the history
Summary:
This list was generated using warnings logged to the console as part of D51514310. The warnings were then manually assessed as to whether they were true positives or false positives using either "dynamic_fn_ptr" or "ignore_dlsym" annotations.

I repeated this process and compiled M4A until there were no warnings logged to the console.

For files that touch open source or are just generally a pain to deal with, I left them ignorelisted as they really didn't seem to contain other function pointers we should be protecting.

Reviewed By: sampriti-fb

Differential Revision: D52634681

fbshipit-source-id: 73c3c84a44d1289a617d0721d8512854dc530848
  • Loading branch information
Oskar Wirga authored and facebook-github-bot committed Jan 19, 2024
1 parent 00c8672 commit 8b45d9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cxx/lyra/cxa_throw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void enableCxaThrowHookBacktraces(bool enable) {
enableBacktraces.store(enable, std::memory_order_relaxed);
}

[[gnu::noreturn]] void (
[[gnu::noreturn]] __attribute__((annotate("dynamic_fn_ptr"))) void (
*original_cxa_throw)(void*, const std::type_info*, void (*)(void*));

#if defined(_LIBCPP_VERSION)
Expand Down

0 comments on commit 8b45d9c

Please sign in to comment.