| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 200dadb commit 053282e
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,7 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | 38 | # Reset this number to 0 on major V8 upgrades. | |
| 39 | 39 | # Increment by one for each non-official patch applied to deps/v8. | |
| 40 | - 'v8_embedder_string': '-node.21', | ||
| 40 | + 'v8_embedder_string': '-node.22', | ||
| 41 | 41 | ||
| 42 | 42 | ##### V8 defaults for Node.js ##### | |
| 43 | 43 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1589,6 +1589,20 @@ config("toolchain") { | |||
| 1589 | 1589 | # Fix build with older versions of GCC | |
| 1590 | 1590 | # Ported from v8 bazel: https://crrev.com/c/3368869 | |
| 1591 | 1591 | "-Wno-stringop-overflow", | |
| 1592 | + | ||
| 1593 | + # Fix a number of bogus errors with gcc12 | ||
| 1594 | + # TODO(miladfarca): re-evaluate for future gcc upgrades | ||
| 1595 | + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111499 | ||
| 1596 | + "-Wno-stringop-overread", | ||
| 1597 | + | ||
| 1598 | + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104336 | ||
| 1599 | + "-Wno-restrict", | ||
| 1600 | + | ||
| 1601 | + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523 | ||
| 1602 | + "-Wno-array-bounds", | ||
| 1603 | + | ||
| 1604 | + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108517 | ||
| 1605 | + "-Wno-nonnull", | ||
| 1592 | 1606 | ] | |
| 1593 | 1607 | } | |
| 1594 | 1608 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3916,7 +3916,9 @@ V8_NOINLINE void FuzzerMonitor::UseAfterFree() { | |||
| 3916 | 3916 | // Use-after-free caught by ASAN. | |
| 3917 | 3917 | std::vector<bool>* storage = new std::vector<bool>(3); | |
| 3918 | 3918 | delete storage; | |
| 3919 | + #if defined(__clang__) | ||
| 3919 | 3920 | USE(storage->at(1)); | |
| 3921 | + #endif | ||
| 3920 | 3922 | } | |
| 3921 | 3923 | ||
| 3922 | 3924 | V8_NOINLINE void FuzzerMonitor::UseOfUninitializedValue() { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -110,7 +110,7 @@ WasmCompilationResult WasmCompilationUnit::ExecuteFunctionCompilation( | |||
| 110 | 110 | case ExecutionTier::kNone: | |
| 111 | 111 | UNREACHABLE(); | |
| 112 | 112 | ||
| 113 | - case ExecutionTier::kLiftoff: | ||
| 113 | + case ExecutionTier::kLiftoff: { | ||
| 114 | 114 | // The --wasm-tier-mask-for-testing flag can force functions to be | |
| 115 | 115 | // compiled with TurboFan, and the --wasm-debug-mask-for-testing can force | |
| 116 | 116 | // them to be compiled for debugging, see documentation. | |
@@ -147,8 +147,8 @@ WasmCompilationResult WasmCompilationUnit::ExecuteFunctionCompilation( | |||
| 147 | 147 | // TODO(wasm): We could actually stop or remove the tiering unit for this | |
| 148 | 148 | // function to avoid compiling it twice with TurboFan. | |
| 149 | 149 | V8_FALLTHROUGH; | |
| 150 | - | ||
| 151 | - case ExecutionTier::kTurbofan: | ||
| 150 | + } | ||
| 151 | + case ExecutionTier::kTurbofan: { | ||
| 152 | 152 | compiler::WasmCompilationData data(func_body); | |
| 153 | 153 | data.func_index = func_index_; | |
| 154 | 154 | data.wire_bytes_storage = wire_bytes_storage; | |
@@ -157,6 +157,9 @@ WasmCompilationResult WasmCompilationUnit::ExecuteFunctionCompilation( | |||
| 157 | 157 | detected); | |
| 158 | 158 | result.for_debugging = for_debugging_; | |
| 159 | 159 | break; | |
| 160 | + } | ||
| 161 | + default: | ||
| 162 | + UNREACHABLE(); | ||
| 160 | 163 | } | |
| 161 | 164 | ||
| 162 | 165 | DCHECK(result.succeeded()); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -169,10 +169,11 @@ TEST(DispatchableTest, MessageWithUnknownProperty) { | |||
| 169 | 169 | } | |
| 170 | 170 | ||
| 171 | 171 | TEST(DispatchableTest, DuplicateMapKey) { | |
| 172 | - for (const std::string& json : | ||
| 173 | - {"{\"id\":42,\"id\":42}", "{\"params\":null,\"params\":null}", | ||
| 174 | - "{\"method\":\"foo\",\"method\":\"foo\"}", | ||
| 175 | - "{\"sessionId\":\"42\",\"sessionId\":\"42\"}"}) { | ||
| 172 | + const std::array<std::string, 4> jsons = { | ||
| 173 | + {"{\"id\":42,\"id\":42}", "{\"params\":null,\"params\":null}", | ||
| 174 | + "{\"method\":\"foo\",\"method\":\"foo\"}", | ||
| 175 | + "{\"sessionId\":\"42\",\"sessionId\":\"42\"}"}}; | ||
| 176 | + for (const std::string& json : jsons) { | ||
| 176 | 177 | SCOPED_TRACE("json = " + json); | |
| 177 | 178 | std::vector<uint8_t> cbor; | |
| 178 | 179 | ASSERT_TRUE(json::ConvertJSONToCBOR(SpanFrom(json), &cbor).ok()); | |
@@ -185,11 +186,12 @@ TEST(DispatchableTest, DuplicateMapKey) { | |||
| 185 | 186 | } | |
| 186 | 187 | ||
| 187 | 188 | TEST(DispatchableTest, ValidMessageParsesOK_NoParams) { | |
| 188 | - for (const std::string& json : | ||
| 189 | - {"{\"id\":42,\"method\":\"Foo.executeBar\",\"sessionId\":" | ||
| 190 | - "\"f421ssvaz4\"}", | ||
| 191 | - "{\"id\":42,\"method\":\"Foo.executeBar\",\"sessionId\":\"f421ssvaz4\"," | ||
| 192 | - "\"params\":null}"}) { | ||
| 189 | + const std::array<std::string, 2> jsons = { | ||
| 190 | + {"{\"id\":42,\"method\":\"Foo.executeBar\",\"sessionId\":" | ||
| 191 | + "\"f421ssvaz4\"}", | ||
| 192 | + "{\"id\":42,\"method\":\"Foo.executeBar\",\"sessionId\":\"f421ssvaz4\"," | ||
| 193 | + "\"params\":null}"}}; | ||
| 194 | + for (const std::string& json : jsons) { | ||
| 193 | 195 | SCOPED_TRACE("json = " + json); | |
| 194 | 196 | std::vector<uint8_t> cbor; | |
| 195 | 197 | ASSERT_TRUE(json::ConvertJSONToCBOR(SpanFrom(json), &cbor).ok()); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -704,15 +704,16 @@ using ContainerTestTypes = ::testing::Types<std::vector<uint8_t>, std::string>; | |||
| 704 | 704 | TYPED_TEST_SUITE(ConvertJSONToCBORTest, ContainerTestTypes); | |
| 705 | 705 | ||
| 706 | 706 | TYPED_TEST(ConvertJSONToCBORTest, RoundTripValidJson) { | |
| 707 | - for (const std::string& json_in : { | ||
| 708 | - "{\"msg\":\"Hello, world.\",\"lst\":[1,2,3]}", | ||
| 709 | - "3.1415", | ||
| 710 | - "false", | ||
| 711 | - "true", | ||
| 712 | - "\"Hello, world.\"", | ||
| 713 | - "[1,2,3]", | ||
| 714 | - "[]", | ||
| 715 | - }) { | ||
| 707 | + const std::array<std::string, 7> jsons = {{ | ||
| 708 | + "{\"msg\":\"Hello, world.\",\"lst\":[1,2,3]}", | ||
| 709 | + "3.1415", | ||
| 710 | + "false", | ||
| 711 | + "true", | ||
| 712 | + "\"Hello, world.\"", | ||
| 713 | + "[1,2,3]", | ||
| 714 | + "[]", | ||
| 715 | + }}; | ||
| 716 | + for (const std::string& json_in : jsons) { | ||
| 716 | 717 | SCOPED_TRACE(json_in); | |
| 717 | 718 | TypeParam json(json_in.begin(), json_in.end()); | |
| 718 | 719 | std::vector<uint8_t> cbor; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments