// This library is built for all targets, including host tests, so __cfi_slowpath may not be // present. But it is only used in the bionic loader tests. extern"C" __attribute__((weak)) void __cfi_slowpath(uint64_t, void*);
staticint g_count;
// Mock a CFI-enabled library without relying on the compiler. extern"C" __attribute__((no_sanitize("hwaddress"))) __attribute__((aligned(4096))) void __cfi_check(uint64_t /*CallSiteTypeId*/, void* /*TargetAddr*/, void* /*Diag*/) {
++g_count;
}
// This code runs before hwasan is initialized.
__attribute__((no_sanitize("hwaddress"))) void preinit_ctor() {
CHECK(g_count == 0);
__cfi_slowpath(42, reinterpret_cast<void*>(&preinit_ctor));
CHECK(g_count == 1);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.