Bug 214596 - Debug build is failing after r264537 on Linux
Summary: Debug build is failing after r264537 on Linux
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Caio Lima
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-21 09:10 PDT by Caio Lima
Modified: 2020-07-21 12:17 PDT (History)
9 users (show)

See Also:


Attachments
Patch (1.84 KB, patch)
2020-07-21 09:18 PDT, Caio Lima
no flags Details | Formatted Diff | Diff
Patch (1.38 KB, patch)
2020-07-21 11:37 PDT, Caio Lima
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Caio Lima 2020-07-21 09:10:01 PDT
Version of GCC is 8.3.0. The error is the following:

```
FAILED: Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-f2e18ffc-15.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBUILDING_JSCONLY__ -DBUILDING_JavaScriptCore -DBUILDING_WITH_CMAKE=1 -DHAVE_CONFIG_H=1 -DJavaScriptCore_EXPORTS -DSTATICALLY_LINKED_WITH_WTF -IDerivedSources/ForwardingHeaders -I. -I../../Source/JavaScriptCore -I../../Source/JavaScriptCore/API -I../../Source/JavaScriptCore/assembler -I../../Source/JavaScriptCore/b3 -I../../Source/JavaScriptCore/b3/air -I../../Source/JavaScriptCore/bindings -I../../Source/JavaScriptCore/builtins -I../../Source/JavaScriptCore/bytecode -I../../Source/JavaScriptCore/bytecompiler -I../../Source/JavaScriptCore/dfg -I../../Source/JavaScriptCore/disassembler -I../../Source/JavaScriptCore/disassembler/ARM64 -I../../Source/JavaScriptCore/disassembler/udis86 -I../../Source/JavaScriptCore/domjit -I../../Source/JavaScriptCore/ftl -I../../Source/JavaScriptCore/heap -I../../Source/JavaScriptCore/debugger -I../../Source/JavaScriptCore/inspector -I../../Source/JavaScriptCore/inspector/agents -I../../Source/JavaScriptCore/inspector/augmentable -I../../Source/JavaScriptCore/inspector/remote -I../../Source/JavaScriptCore/interpreter -I../../Source/JavaScriptCore/jit -I../../Source/JavaScriptCore/llint -I../../Source/JavaScriptCore/parser -I../../Source/JavaScriptCore/profiler -I../../Source/JavaScriptCore/runtime -I../../Source/JavaScriptCore/tools -I../../Source/JavaScriptCore/wasm -I../../Source/JavaScriptCore/wasm/js -I../../Source/JavaScriptCore/yarr -IDerivedSources/JavaScriptCore -IDerivedSources/JavaScriptCore/inspector -IDerivedSources/JavaScriptCore/runtime -IDerivedSources/JavaScriptCore/yarr -fdiagnostics-color=always -Wextra -Wall -Wno-expansion-to-defined -Wno-noexcept-type -Wno-psabi -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align  -fno-strict-aliasing -fno-exceptions -fno-rtti -gsplit-dwarf -g -fPIC   -ffp-contract=off -std=c++17 -MD -MT Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-f2e18ffc-15.cpp.o -MF Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-f2e18ffc-15.cpp.o.d -o Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-f2e18ffc-15.cpp.o -c DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-f2e18ffc-15.cpp
In file included from DerivedSources/ForwardingHeaders/wtf/StdLibExtras.h:32,
                 from DerivedSources/ForwardingHeaders/wtf/FastMalloc.h:26,
                 from ../../Source/JavaScriptCore/config.h:38,
                 from ../../Source/JavaScriptCore/runtime/IntlLocaleConstructor.cpp:26,
                 from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-f2e18ffc-15.cpp:1:
../../Source/JavaScriptCore/runtime/IntlObject.cpp: In function ‘constexpr WTF::ASCIILiteral JSC::relevantExtensionKeyString(JSC::RelevantExtensionKey)’:
DerivedSources/ForwardingHeaders/wtf/Assertions.h:354:34: error: call to non-‘constexpr’ function ‘void WTFReportAssertionFailure(const char*, int, const char*, const char*)’
         WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion); \
         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../Source/JavaScriptCore/runtime/IntlObject.cpp:657:5: note: in expansion of macro ‘ASSERT_UNDER_CONSTEXPR_CONTEXT’
     ASSERT_UNDER_CONSTEXPR_CONTEXT(0);
```
Comment 1 Caio Lima 2020-07-21 09:18:46 PDT
Created attachment 404824 [details]
Patch
Comment 2 Darin Adler 2020-07-21 09:29:34 PDT
Comment on attachment 404824 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=404824&action=review

> Source/JavaScriptCore/runtime/IntlObject.cpp:-657
> -    ASSERT_UNDER_CONSTEXPR_CONTEXT(0);

Does ASSERT_UNDER_CONSTEXPR_CONTEXT work at all on this "Linux context"?
Comment 3 Caio Lima 2020-07-21 11:01:15 PDT
(In reply to Darin Adler from comment #2)
> Comment on attachment 404824 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=404824&action=review
> 
> > Source/JavaScriptCore/runtime/IntlObject.cpp:-657
> > -    ASSERT_UNDER_CONSTEXPR_CONTEXT(0);
> 
> Does ASSERT_UNDER_CONSTEXPR_CONTEXT work at all on this "Linux context"?

It seems that whenever the `assert` is falsy, it triggers compilation error due to call of `WTFReportAssertionFailure`. I spent sometime trying to understand why, but got no success yet.
Comment 4 Darin Adler 2020-07-21 11:05:32 PDT
Comment on attachment 404824 [details]
Patch

Yusuke suggested removing the ASSERT_UNDER_CONSTEXPR_CONTEXT entirely and not changing this from constexpr to inline.
Comment 5 Yusuke Suzuki 2020-07-21 11:13:29 PDT
Comment on attachment 404824 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=404824&action=review

>>> Source/JavaScriptCore/runtime/IntlObject.cpp:-657
>>> -    ASSERT_UNDER_CONSTEXPR_CONTEXT(0);
>> 
>> Does ASSERT_UNDER_CONSTEXPR_CONTEXT work at all on this "Linux context"?
> 
> It seems that whenever the `assert` is falsy, it triggers compilation error due to call of `WTFReportAssertionFailure`. I spent sometime trying to understand why, but got no success yet.

I think removing this assertion is better for now. GCC seems not handling switch's reachability correctly.
Comment 6 Caio Lima 2020-07-21 11:37:00 PDT
Created attachment 404842 [details]
Patch
Comment 7 EWS 2020-07-21 12:16:04 PDT
Committed r264671: <https://trac.webkit.org/changeset/264671>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404842 [details].
Comment 8 Radar WebKit Bug Importer 2020-07-21 12:17:18 PDT
<rdar://problem/65896603>