1. 17 Aug, 2020 1 commit
  2. 09 Jun, 2020 1 commit
  3. 08 Nov, 2019 1 commit
  4. 03 Jun, 2019 1 commit
  5. 24 May, 2019 1 commit
  6. 15 Apr, 2019 1 commit
  7. 29 Jan, 2019 1 commit
    • Andreas Haas's avatar
      [wasm][traphandler] Mark code object validation check as slow · bf505216
      Andreas Haas authored
      In the trap handler we validate the list of registered code objects
      every time we register or de-register a new code object. The complexity
      of this validation is O(num-code-objects * num-instructions). For big
      WebAssembly modules with several hundred thousand code objects, this
      validation causes significant overhead (we saw up to 10x) and makes
      debugging very tedious. With this CL I mark the validation as slow.
      Thereby it is still enabled in most tests on our bots, but it is
      possible to disable validation when debugging large web applications.
      
      The referenced bug issue was created by developers who had problems
      with debugging because of this issue.
      
      R=mark@chromium.org
      
      Bug: v8:8536
      Change-Id: If7ecb554eebcb04eb43a1f791b96c7a42a47e60f
      Reviewed-on: https://chromium-review.googlesource.com/c/1442634Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59181}
      bf505216
  8. 04 Jan, 2019 1 commit
    • Clemens Hammacher's avatar
      Revert "Remove trap handler fallback for sanitizers" · 5ac88bfc
      Clemens Hammacher authored
      This reverts commit 26a78061.
      
      Reason for revert: Not all fuzzers support custom segfault handlers yet, see https://crbug.com/918949
      
      Original change's description:
      > Remove trap handler fallback for sanitizers
      > 
      > Since https://crrev.com/c/1335572, our sanitizers allow to set custom
      > segfault handlers. Thus remove special code that was added to handle
      > sanitizers that prevent installation of segfault handlers. Instead,
      > CHECK that the signal handler was installed correctly.
      > 
      > R=​ahaas@chromium.org, mseaborn@chromium.org, mark@chromium.org
      > 
      > Bug: chromium:830894
      > Change-Id: I3bd66e33efdceb3e8469f3f4a09fbde90cb3d7ec
      > Reviewed-on: https://chromium-review.googlesource.com/c/1392199
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#58513}
      
      TBR=mseaborn@chromium.org,ahaas@chromium.org,mark@chromium.org,clemensh@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: chromium:830894, chromium:918949
      Change-Id: Ide545860cf7729139ac50c0dd2e85facca49b0b1
      Reviewed-on: https://chromium-review.googlesource.com/c/1396277Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58556}
      5ac88bfc
  9. 03 Jan, 2019 1 commit
  10. 30 Nov, 2018 1 commit
  11. 29 Nov, 2018 1 commit
    • Andreas Haas's avatar
      Reland: [wasm] Add more unit tests for trap handler · 3d2bc5d0
      Andreas Haas authored
      The problem were missing V8_EXPORT_PRIVATE and V8_EXPORT.
      
      The unittests test if the trap handler only handles those traps it
      is supposed to handle:
      * Only handle traps when the thread-in-wasm flag is set.
      * Only handle traps of the right type, i.e. memory access violations.
      * Only handle traps at recorded instructions.
      
      The tests also test the consistency of the thread-in-wasm flag. I made
      one change in the trap handler where that consistency could be
      violated.
      
      All tests are executed with the default trap handler provided by V8,
      and with the trap handler callback installed in a test signal/exception
      handler.
      
      Patchset 1 is the original CL.
      
      R=mstarzinger@chromium.org
      
      Change-Id: I172d94f24cdba4c3a1f7f344825b059dbb59da79
      Reviewed-on: https://chromium-review.googlesource.com/c/1351024Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57947}
      3d2bc5d0
  12. 27 Nov, 2018 2 commits
    • Clemens Hammacher's avatar
      Revert "[wasm] Add more unit tests for trap handler" · 2fd07376
      Clemens Hammacher authored
      This reverts commit 4644b32e.
      
      Reason for revert: Link errors on win64: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64%20-%20debug/25950
      
      Original change's description:
      > [wasm] Add more unit tests for trap handler
      > 
      > The unittests test if the trap handler only handles those traps it
      > is supposed to handle:
      > * Only handle traps when the thread-in-wasm flag is set.
      > * Only handle traps of the right type, i.e. memory access violations.
      > * Only handle traps at recorded instructions.
      > 
      > The tests also test the consistency of the thread-in-wasm flag. I made
      > one change in the trap handler where that consistency could be
      > violated.
      > 
      > All tests are executed with the default trap handler provided by V8,
      > and with the trap handler callback installed in a test signal/exception
      > handler.
      > 
      > Change-Id: I03904bb6effd2e8694d3f4d1fbf62bc38002646e
      > Reviewed-on: https://chromium-review.googlesource.com/c/1340246
      > Commit-Queue: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#57858}
      
      TBR=mstarzinger@chromium.org,ahaas@chromium.org,mark@chromium.org
      
      Change-Id: Iac2f20c73744226885ea1810813863a21c5faf8c
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/1351021Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57861}
      2fd07376
    • Andreas Haas's avatar
      [wasm] Add more unit tests for trap handler · 4644b32e
      Andreas Haas authored
      The unittests test if the trap handler only handles those traps it
      is supposed to handle:
      * Only handle traps when the thread-in-wasm flag is set.
      * Only handle traps of the right type, i.e. memory access violations.
      * Only handle traps at recorded instructions.
      
      The tests also test the consistency of the thread-in-wasm flag. I made
      one change in the trap handler where that consistency could be
      violated.
      
      All tests are executed with the default trap handler provided by V8,
      and with the trap handler callback installed in a test signal/exception
      handler.
      
      Change-Id: I03904bb6effd2e8694d3f4d1fbf62bc38002646e
      Reviewed-on: https://chromium-review.googlesource.com/c/1340246
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57858}
      4644b32e
  13. 20 Nov, 2018 1 commit
  14. 30 Oct, 2018 1 commit
  15. 26 Oct, 2018 1 commit
  16. 20 Sep, 2018 1 commit
  17. 29 Aug, 2018 1 commit
  18. 22 Aug, 2018 1 commit
  19. 18 Jul, 2018 1 commit
  20. 13 Jul, 2018 1 commit
  21. 07 May, 2018 2 commits
  22. 04 May, 2018 1 commit
    • Eric Holk (eholk)'s avatar
      [wasm] Refactor trap handlers to make way for Windows support · bb60967e
      Eric Holk (eholk) authored
      In preparing for adding trap-based bounds checking to Windows, this
      change refactors the code to separate the platform-specific portions
      from that which can be shared between platforms.
      
      Internally, we've renamed `RegisterDefaultSignalHandler` to
      `RegisterDefaultTrapHandler` to more accurately represent the
      difference in terminology between Linux (signals) and Windows
      (exceptions). The external API is left the same so as not to break
      downstream clients.
      
      This CL is primarily to make room for Windows support. Future CLs
      will begin adding support for Windows.
      
      This is a reincarnation of https://crrev.com/c/626558.
      
      Bug: v8:6743
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: Iaa8bfd68c14cd1d17933b12c24cb8dd5ee8a21d6
      Reviewed-on: https://chromium-review.googlesource.com/998829
      Commit-Queue: Eric Holk <eholk@chromium.org>
      Reviewed-by: 's avatarBrad Nelson <bradnelson@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53006}
      bb60967e
  23. 14 Apr, 2018 1 commit
    • Jakob Kummerow's avatar
      [ubsan] Change Address typedef to uintptr_t · 2459046c
      Jakob Kummerow authored
      The "Address" type is V8's general-purpose type for manipulating memory
      addresses. Per the C++ spec, pointer arithmetic and pointer comparisons
      are undefined behavior except within the same array; since we generally
      don't operate within a C++ array, our general-purpose type shouldn't be
      a pointer type.
      
      Bug: v8:3770
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: Ib96016c24a0f18bcdba916dabd83e3f24a1b5779
      Reviewed-on: https://chromium-review.googlesource.com/988657
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52601}
      2459046c
  24. 09 Apr, 2018 1 commit
  25. 04 Apr, 2018 1 commit
    • Eric Holk's avatar
      [wasm] enable StoreMem_offset_oob_i64 test with trap handlers · f56e2a02
      Eric Holk authored
      The first part of this change updates StoreMem_offset_oob_i64 to use one page of
      Wasm memory, rather than just a few bytes. Using less than a page was out of
      spec for Wasm anyway, so this is better.
      
      This required a small change in the test runner to set and clear the
      thread_in_wasm flag around Wasm calls. This was accomplished by a
      ThreadInWasmScope convenience class.
      
      The majority of the changes are because the cctest environment does not support
      runtime exceptions. In the code generator, where we used to throw a
      WasmMemOutOfBounds exception, we now need to call out to the test hook instead
      if runtime exceptions are not supported. This involved plumbing the
      runtime_exception_support flag down to the code generator. Rather than adding
      and shuffling around extra parameters everywhere, this CL packages the previous
      protected instruction list in a new WasmCompilationData object that now includes
      the runtime_exception_support flag as well.
      
      Bug: v8:5277
      Change-Id: Ic9c9e5a53a07a7773b58c0aee7c26bbd2ddf82f3
      Reviewed-on: https://chromium-review.googlesource.com/989017
      Commit-Queue: Eric Holk <eholk@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52368}
      f56e2a02
  26. 26 Mar, 2018 1 commit
  27. 22 Mar, 2018 1 commit
  28. 20 Mar, 2018 1 commit
  29. 27 Feb, 2018 1 commit
  30. 21 Feb, 2018 1 commit
  31. 02 Feb, 2018 1 commit
  32. 07 Dec, 2017 1 commit
    • Karl Schimpf's avatar
      [wasm] First step of refactoring trap handling to be per module. · 0d5de9ad
      Karl Schimpf authored
      The previous code assumed that trap handling was a global concept, defined
      by function trap_handler::UseTrapHandler(). This CL does the first step
      in changing the decision to be specifiable at a module level.
      
      Therefore trap_handler::UseTrapHandler() is replaced by
      trap_handler::IsTrapHandlerEnabled(), and communicates if compilation
      supports the use of trap handlers (but still allowing the use of
      bounds checking on memory accesses).
      
      It then refactors the classes ModuleEnv and WasmCompiledModule to have
      a field "use_trap_handler" that specifies if traps should be used for
      the memory accesses in the module being compiled.
      
      Bug: v8:7143
      Change-Id: I9844842d5721c86c2dd55e911b42bf8b9922cf63
      Reviewed-on: https://chromium-review.googlesource.com/802322
      Commit-Queue: Eric Holk <eholk@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
      Reviewed-by: 's avatarEric Holk <eholk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49915}
      0d5de9ad
  33. 28 Nov, 2017 3 commits
    • Mircea Trofin's avatar
      Revert "Revert "[wasm] JIT using WasmCodeManager"" · b03b1bd9
      Mircea Trofin authored
      This reverts commit b301203e.
      
      Reason for revert: Fixed issues on arm.
      
      Original change's description:
      > Revert "[wasm] JIT using WasmCodeManager"
      > 
      > This reverts commit d4c8393c.
      > 
      > Reason for revert: Breaks ARM hardware:
      > https://build.chromium.org/p/client.v8.ports/builders/V8%20Arm%20-%20debug/builds/5268
      > 
      > Original change's description:
      > > [wasm] JIT using WasmCodeManager
      > > 
      > > This is the first step towards wasm code sharing. This CL moves wasm
      > > code generation outside the JavaScript GC heap using the previously -
      > > introduced WasmCodeManager (all this, behind the --wasm-jit-to-native
      > > flag).
      > > 
      > > See design document: go/wasm-on-native-heap-stage-1
      > > 
      > > This CL doesn't change other wasm architectural invariants. We still
      > > have per-Isolate wasm code generation, and per-wasm module instance
      > > code specialization.
      > > 
      > > Bug:v8:6876
      > > 
      > > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > > Change-Id: I1e08cecad75f93fb081545c31228a4568be276d3
      > > Reviewed-on: https://chromium-review.googlesource.com/674086
      > > Reviewed-by: Ben Titzer <titzer@chromium.org>
      > > Reviewed-by: Eric Holk <eholk@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#49689}
      > 
      > TBR=bradnelson@chromium.org,titzer@chromium.org,mtrofin@chromium.org,eholk@chromium.org
      > 
      > Change-Id: I89af1ea5decd841bc12cd2ceaf74d32bc4433885
      > No-Presubmit: true
      > No-Tree-Checks: true
      > No-Try: true
      > Bug: v8:6876
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Reviewed-on: https://chromium-review.googlesource.com/794690
      > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
      > Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#49691}
      
      TBR=bradnelson@chromium.org,machenbach@chromium.org,titzer@chromium.org,mtrofin@chromium.org,eholk@chromium.org
      
      Change-Id: I1b07638d1bb2ba0664305b4b2dcfc1342dc8444f
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:6876
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/794434
      Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
      Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49692}
      b03b1bd9
    • Michael Achenbach's avatar
      Revert "[wasm] JIT using WasmCodeManager" · b301203e
      Michael Achenbach authored
      This reverts commit d4c8393c.
      
      Reason for revert: Breaks ARM hardware:
      https://build.chromium.org/p/client.v8.ports/builders/V8%20Arm%20-%20debug/builds/5268
      
      Original change's description:
      > [wasm] JIT using WasmCodeManager
      > 
      > This is the first step towards wasm code sharing. This CL moves wasm
      > code generation outside the JavaScript GC heap using the previously -
      > introduced WasmCodeManager (all this, behind the --wasm-jit-to-native
      > flag).
      > 
      > See design document: go/wasm-on-native-heap-stage-1
      > 
      > This CL doesn't change other wasm architectural invariants. We still
      > have per-Isolate wasm code generation, and per-wasm module instance
      > code specialization.
      > 
      > Bug:v8:6876
      > 
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: I1e08cecad75f93fb081545c31228a4568be276d3
      > Reviewed-on: https://chromium-review.googlesource.com/674086
      > Reviewed-by: Ben Titzer <titzer@chromium.org>
      > Reviewed-by: Eric Holk <eholk@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#49689}
      
      TBR=bradnelson@chromium.org,titzer@chromium.org,mtrofin@chromium.org,eholk@chromium.org
      
      Change-Id: I89af1ea5decd841bc12cd2ceaf74d32bc4433885
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:6876
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/794690Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49691}
      b301203e
    • Mircea Trofin's avatar
      [wasm] JIT using WasmCodeManager · d4c8393c
      Mircea Trofin authored
      This is the first step towards wasm code sharing. This CL moves wasm
      code generation outside the JavaScript GC heap using the previously -
      introduced WasmCodeManager (all this, behind the --wasm-jit-to-native
      flag).
      
      See design document: go/wasm-on-native-heap-stage-1
      
      This CL doesn't change other wasm architectural invariants. We still
      have per-Isolate wasm code generation, and per-wasm module instance
      code specialization.
      
      Bug:v8:6876
      
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I1e08cecad75f93fb081545c31228a4568be276d3
      Reviewed-on: https://chromium-review.googlesource.com/674086Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Reviewed-by: 's avatarEric Holk <eholk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49689}
      d4c8393c
  34. 16 Oct, 2017 1 commit
  35. 11 Oct, 2017 2 commits
    • Eric Holk (eholk)'s avatar
      Reland "Reland "[wasm] trap handlers: fall back on old signal handler"" · 1117da83
      Eric Holk (eholk) authored
      This is a reland of cc237d87
      Original change's description:
      > Reland "[wasm] trap handlers: fall back on old signal handler"
      > 
      > This is a reland of ee4fe896
      > Original change's description:
      > > [wasm] trap handlers: fall back on old signal handler
      > > 
      > > This is primarily needed to test D8 under ASan. ASan installs a signal handler
      > > early in the process startup to show stack traces from crashes. We need to make
      > > sure that if V8 does not handle a signal then the existing handler gets a
      > > chance.
      > > 
      > > This change only applies when using V8's default signal handler. When
      > > integrating with the embedder's signal handler the behavior is unchanged.
      > > 
      > > Bug: chromium:771948
      > > Change-Id: Ifd560acf9700ec5f714f009530258fa92c83cabe
      > > Reviewed-on: https://chromium-review.googlesource.com/705823
      > > Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
      > > Commit-Queue: Eric Holk <eholk@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#48429}
      > 
      > Bug: chromium:771948
      > Change-Id: Ide307091c432fd933c48f89c51851b8dce44dd30
      > Reviewed-on: https://chromium-review.googlesource.com/710114
      > Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
      > Commit-Queue: Eric Holk <eholk@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#48435}
      
      Bug: chromium:771948
      Change-Id: I781dfe356a728760090b6ccfa58212096e8f20c8
      Reviewed-on: https://chromium-review.googlesource.com/713956Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
      Commit-Queue: Eric Holk <eholk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48474}
      1117da83
    • Michael Achenbach's avatar
      Revert "Reland "[wasm] trap handlers: fall back on old signal handler"" · 33d4e209
      Michael Achenbach authored
      This reverts commit cc237d87.
      
      Reason for revert: breaks win clang:
      https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20clang/builds/8538
      
      Original change's description:
      > Reland "[wasm] trap handlers: fall back on old signal handler"
      > 
      > This is a reland of ee4fe896
      > Original change's description:
      > > [wasm] trap handlers: fall back on old signal handler
      > > 
      > > This is primarily needed to test D8 under ASan. ASan installs a signal handler
      > > early in the process startup to show stack traces from crashes. We need to make
      > > sure that if V8 does not handle a signal then the existing handler gets a
      > > chance.
      > > 
      > > This change only applies when using V8's default signal handler. When
      > > integrating with the embedder's signal handler the behavior is unchanged.
      > > 
      > > Bug: chromium:771948
      > > Change-Id: Ifd560acf9700ec5f714f009530258fa92c83cabe
      > > Reviewed-on: https://chromium-review.googlesource.com/705823
      > > Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
      > > Commit-Queue: Eric Holk <eholk@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#48429}
      > 
      > Bug: chromium:771948
      > Change-Id: Ide307091c432fd933c48f89c51851b8dce44dd30
      > Reviewed-on: https://chromium-review.googlesource.com/710114
      > Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
      > Commit-Queue: Eric Holk <eholk@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#48435}
      
      TBR=mseaborn@chromium.org,bradnelson@chromium.org,gdeepti@chromium.org,eholk@chromium.org,mark@chromium.org
      
      Change-Id: If71f61ae186fc6be2006edeb2dffd7e2b6827d91
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:771948
      Reviewed-on: https://chromium-review.googlesource.com/711854Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48436}
      33d4e209