• Jakob Kummerow's avatar
    [ubsan] Check valid types on ExternalReference-called functions · df99becf
    Jakob Kummerow authored
    All C++ functions called directly from generated code must have
    a predictable ABI. We ensure that by requiring their return and
    argument types to be scalars -- in particular, they must not be
    non-pointer ObjectPtr or ObjectSlot types, which is easy to get
    wrong and difficult to debug. This patch adds compile-time type
    checks enforcing the requirement to the macro used for creating
    ExternalReferences for functions.
    
    Bug: v8:3770
    Change-Id: I442cf25e2f72b7ea84d4a50c9c665b187b179ca0
    Reviewed-on: https://chromium-review.googlesource.com/c/1334974
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#57560}
    df99becf
objects.h 86.6 KB