// Copyright 2017 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // PLEASE READ BEFORE CHANGING THIS FILE! // // This file implements the out of bounds trap handler for // WebAssembly. Trap handlers are notoriously difficult to get // right, and getting it wrong can lead to security // vulnerabilities. In order to minimize this risk, here are some // rules to follow. // // 1. Do not introduce any new external dependencies. This file needs // to be self contained so it is easy to audit everything that a // trap handler might do. // // 2. Any changes must be reviewed by someone from the crash reporting // or security team. See OWNERS for suggested reviewers. // // For more information, see https://goo.gl/yMeyUY. // // This file contains most of the code that actually runs in a trap handler // context. Some additional code is used both inside and outside the trap // handler. This code can be found in handler-shared.cc. #include "src/trap-handler/trap-handler-internal.h" #include "src/trap-handler/trap-handler.h" namespace v8 { namespace internal { namespace trap_handler { #if V8_TRAP_HANDLER_SUPPORTED // This function contains the platform independent portions of fault // classification. bool IsFaultAddressCovered(uintptr_t fault_addr) { … } bool IsAccessedMemoryCovered(uintptr_t addr) { … } #endif // V8_TRAP_HANDLER_SUPPORTED } // namespace trap_handler } // namespace internal } // namespace v8