commit | 8515c2a1c5c016646b61221586cd4e5839f425ee | [log] [tgz] |
---|---|---|
author | Jakob Kummerow <jkummerow@chromium.org> | Fri Jan 25 00:30:45 2019 |
committer | Jakob Kummerow <jkummerow@chromium.org> | Fri Jan 25 00:30:45 2019 |
tree | d4a2941e7db31443eba0f4353eda92156b90d8fa | |
parent | 9977c471be57fad15e5d15fc7371f54bd562c9dd [diff] |
[ubsan] Fix UBSan warnings in Maybe<bool> specialization The default constructor of MaybeBase<> does not initialize the m_value field, but the move-constructor reads it, so when moving a default-constructed instance, the bool-typed field being read can contain a value that's neither 0 nor 1, which is undefined behavior. This patch fixes that by always initializing the field. For consistency, the same fix is applied to the int and double specializations. The UBSan warnings can be observed when building V8 with cflags += [ "-fsanitize=undefined" ] and running its "inspector" tests. Bug: v8:3770 Change-Id: I20d164434c6f3ee5cb55dd96058f7293bb5133f3
This package contains code generators and templates for the Chromium inspector protocol.
The canonical location of this package is at https://chromium.googlesource.com/deps/inspector_protocol/
In the Chromium tree, it's rolled into https://cs.chromium.org/chromium/src/third_party/inspector_protocol/
In the V8 tree, it's rolled into https://cs.chromium.org/chromium/src/v8/third_party/inspector_protocol/
See also Contributing to Chrome Devtools Protocol.
We‘re working on enabling standalone builds for parts of this package for testing and development, please feel free to ignore this for now. But, if you’re familiar with Chromium's development process and have the depot_tools installed, you may use these commands to fetch the package (and dependencies) and build and run the tests:
fetch inspector_protocol cd src gn gen out/Release ninja -C out/Release json_parser_test out/Release/json_parser_test