Enable -Wconditional-uninitialized in bmalloc, WTF, JavaScriptCore. Neither bmalloc nor WTF have any warnings. This fixes the following warnings in JavaScriptCore: Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:3428:24: error: variable 'continuation' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] m_out.jump(continuation); ^~~~~~~~~~~~ Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:3411:33: note: initialize the variable 'continuation' to silence this warning LBasicBlock continuation; ^ = nullptr Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:3429:42: error: variable 'lastNext' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] m_out.appendTo(continuation, lastNext); ^~~~~~~~ Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:3412:29: note: initialize the variable 'lastNext' to silence this warning LBasicBlock lastNext; ^ = nullptr Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:13299:44: error: variable 'globalObject' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] patchpoint->appendSomeRegister(globalObject); ^~~~~~~~~~~~ Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:13288:28: note: initialize the variable 'globalObject' to silence this warning LValue globalObject; ^ = nullptr 3 errors generated. In file included from Release/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource63.cpp:1: ./ftl/FTLThunks.cpp:170:28: error: variable 'someGPR' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] jit.move64ToDouble(someGPR, reg.fpr()); ^~~~~~~ ./ftl/FTLThunks.cpp:157:5: note: variable 'someGPR' is declared here GPRReg someGPR; ^ 1 error generated. In file included from Release/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource137.cpp:8: ./wasm/js/WebAssemblyTablePrototype.cpp:145:35: error: variable 'wasmWrapperFunction' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] table->set(index, wasmWrapperFunction); ^~~~~~~~~~~~~~~~~~~ ./wasm/js/WebAssemblyTablePrototype.cpp:133:56: note: initialize the variable 'wasmWrapperFunction' to silence this warning WebAssemblyWrapperFunction* wasmWrapperFunction; ^ = nullptr ./wasm/js/WebAssemblyTablePrototype.cpp:142:17: error: variable 'wasmFunction' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] if (wasmFunction) ^~~~~~~~~~~~ ./wasm/js/WebAssemblyTablePrototype.cpp:132:42: note: initialize the variable 'wasmFunction' to silence this warning WebAssemblyFunction* wasmFunction; ^ = nullptr 2 errors generated. Source/JavaScriptCore/b3/testb3_4.cpp:870:36: error: variable 'arg' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] CHECK(compileAndRun<int>(proc, arg) == 8675309); ^~~ In file included from Source/JavaScriptCore/b3/testb3_4.cpp:27: Source/JavaScriptCore/b3/testb3.h:106:12: note: expanded from macro 'CHECK' if (!!(x)) \ ^ Source/JavaScriptCore/b3/testb3_4.cpp:851:18: note: initialize the variable 'arg' to silence this warning uintptr_t arg; ^ = 0 Source/JavaScriptCore/b3/testb3_4.cpp:859:6: error: variable 'slot' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] *slot = 8675309; ^~~~ Source/JavaScriptCore/b3/testb3_4.cpp:850:14: note: initialize the variable 'slot' to silence this warning int* slot; ^ = nullptr 2 errors generated.
<rdar://problem/58540387>
Created attachment 387564 [details] Patch v1
Comment on attachment 387564 [details] Patch v1 Oops, different variables aren't initialized on iOS.
(In reply to David Kilzer (:ddkilzer) from comment #3) > Comment on attachment 387564 [details] > Patch v1 > > Oops, different variables aren't initialized on iOS. In file included from Release-iphoneos/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource12.cpp:7: ./b3/B3LowerToAir.cpp:2298:34: error: variable 'strongFailBlock' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] comparisonFail = strongFailBlock; ^~~~~~~~~~~~~~~ ./b3/B3LowerToAir.cpp:2291:41: note: initialize the variable 'strongFailBlock' to silence this warning Air::BasicBlock* strongFailBlock; ^ = nullptr 1 error generated. And there are additional errors for Debug builds: In file included from WebKitBuild/Debug/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource129.cpp:1: In file included from ./wasm/WasmB3IRGenerator.cpp:58: ./wasm/WasmFunctionParser.h:238:12: error: variable 'op' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] ASSERT(op == OpType::End); ^~ In file included from WebKitBuild/Debug/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource129.cpp:1: In file included from ./wasm/WasmB3IRGenerator.cpp:26: In file included from Source/JavaScriptCore/config.h:38: In file included from Debug/usr/local/include/wtf/FastMalloc.h:26: In file included from Debug/usr/local/include/wtf/StdLibExtras.h:32: Debug/usr/local/include/wtf/Assertions.h:324:11: note: expanded from macro 'ASSERT' if (!(assertion)) { \ ^~~~~~~~~ In file included from WebKitBuild/Debug/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource129.cpp:1: In file included from ./wasm/WasmB3IRGenerator.cpp:58: ./wasm/WasmFunctionParser.h:208:31: note: in instantiation of member function 'JSC::Wasm::FunctionParser<JSC::Wasm::B3IRGenerator>::parseBody' requested here WASM_FAIL_IF_HELPER_FAILS(parseBody()); ^ In file included from WebKitBuild/Debug/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource129.cpp:1: ./wasm/WasmB3IRGenerator.cpp:1991:38: note: in instantiation of member function 'JSC::Wasm::FunctionParser<JSC::Wasm::B3IRGenerator>::parse' requested here WASM_FAIL_IF_HELPER_FAILS(parser.parse()); ^ In file included from WebKitBuild/Debug/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource129.cpp:1: In file included from ./wasm/WasmB3IRGenerator.cpp:58: ./wasm/WasmFunctionParser.h:217:15: note: initialize the variable 'op' to silence this warning uint8_t op; ^ = '\0' 1 error generated.
Created attachment 387570 [details] Patch v2
The "jsc" bot failure: {"allMasmTestsPassed":true,"allApiTestsPassed":true,"stressTestFailures":["wasm.yaml/wasm/lowExecutableMemory/imports-oom.js.default-wasm"],"allDFGTestsPassed":true,"allB3TestsPassed":true,"allAirTestsPassed":true} Waiting to see if this failure is specific to this patch.
(In reply to David Kilzer (:ddkilzer) from comment #6) > The "jsc" bot failure: > > {"allMasmTestsPassed":true,"allApiTestsPassed":true,"stressTestFailures": > ["wasm.yaml/wasm/lowExecutableMemory/imports-oom.js.default-wasm"], > "allDFGTestsPassed":true,"allB3TestsPassed":true,"allAirTestsPassed":true} > > Waiting to see if this failure is specific to this patch. Hmmm, the results just turned green. Waiting for remaining bots to go green before cq+.
The mac-debug-wk1 failure is unrelated.
Comment on attachment 387570 [details] Patch v2 Clearing flags on attachment: 387570 Committed r254500: <https://trac.webkit.org/changeset/254500>
All reviewed patches have been landed. Closing bug.
(In reply to David Kilzer (:ddkilzer) from comment #8) > The mac-debug-wk1 failure is unrelated. Filed Bug 206241 for this.