commit | 69359e93face3ea06556fe4d52347fcd08c1b357 | [log] [tgz] |
---|---|---|
author | Daniel Cheng <[email protected]> | Thu Jun 20 23:43:02 2019 |
committer | Commit Bot <[email protected]> | Thu Jun 20 23:43:02 2019 |
tree | 0494d8b4e872f7c374b0d92c0c8b675339fc60f0 | |
parent | e495062bb06c8b5b03f4eec0507a097d036e5981 [diff] |
Shorten TRAP_SEQUENCE on Intel. On Intel, TRAP_SEQUENCE() consisted of: int3 // Breakpoint ud2 // Make sure it crashes in case a developer // steps past the breakpoint push $<unique value> // Prevent trap sequences from being merged ud2 // Only on Windows x64 and Mac, quirk of // __builtin_unreachable(). Previously, the push instruction was required to make CHECKs somewhat unique, so that compilers like gcc wouldn't fold all the CHECKs in a function into one common sequence. However, clang won't fold asm sequences together, so just drop the push completely. On Win64 and Mac, also drop the explicit ud2 from TRAP_SEQUENCE: __builtin_unreachable() always emits a ud2 on those platforms, and there's no reason to have ud2 twice in a row. To simplify followups, this CL also temporarily splits the TRAP_SEQUENCE macro into TRAP_SEQUENCE1 and TRAP_SEQUENCE2: - TRAP_SEQUENCE1() is responsible for triggering a debug breakpoint. - TRAP_SEQUENCE2() is responsible for ensuring fatal termination. Staged followups will turn TRAP_SEQUENCE1 into no-ops. Assuming crash reports aren't affected, the final followup will remove TRAP_SEQUENCE1 entirely. Bug: 958675 Change-Id: Id86e70a23a1407404721b9da4f2d2374fa86dc3f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1589282 Commit-Queue: Daniel Cheng <[email protected]> Reviewed-by: Mark Mentovai <[email protected]> Reviewed-by: Bruce Dawson <[email protected]> Reviewed-by: Nico Weber <[email protected]> Cr-Commit-Position: refs/heads/master@{#671123}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .