RESOLVED FIXED 273407
ASSERTION FAILED: !m_inferredType in WebGPU/WGSL/TypeCheck.cpp(1978)
https://bugs.webkit.org/show_bug.cgi?id=273407
Summary ASSERTION FAILED: !m_inferredType in WebGPU/WGSL/TypeCheck.cpp(1978)
wgslfuzz
Reported 2024-04-29 08:56:01 PDT
On git commit e9acc98eb155a5d5a45ea8fb4e763ff4cede6eb0, compiling the attached shader program with `./wgslfuzz shader.wgsl main` triggers an assertion violation. ``` @compute @workgroup_size(1, 1, 1) fn main() { if array<f32, 9>() { return; } else { storageBarrier(); return; } } ``` #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44 #1 __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78 #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89 #3 0x00007fdc2fc048e6 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #4 0x00007fdc2fbe88b7 in __GI_abort () at ./stdlib/abort.c:79 #5 0x0000559ad36c1a30 in WTFCrashWithInfo () at WTF/Headers/wtf/Assertions.h:862 #6 0x0000559ad3ad39d1 in WGSL::TypeChecker::infer (this=<optimized out>, expression=..., evaluation=<optimized out>, discardResult=<optimized out>) at Source/WebGPU/WGSL/TypeCheck.cpp:1978 #7 0x0000559ad3b9a2f9 in WGSL::AST::Visitor::checkErrorAndVisit<WGSL::AST::Statement> (this=0x7fdc2df03420, x=...) at Source/WebGPU/WGSL/AST/ASTVisitor.h:135 #8 WGSL::AST::Visitor::visit (this=0x7fdc2df03420, compoundStatement=...) at Source/WebGPU/WGSL/AST/ASTVisitor.cpp:479 #9 0x0000559ad3ad8343 in WGSL::AST::ScopedVisitor<WGSL::Binding>::visit (this=0x7fdc2df03420, statement=...) at Source/WebGPU/WGSL/AST/ASTScopedVisitorInlines.h:44 #10 0x0000559ad3b9a2f9 in WGSL::AST::Visitor::checkErrorAndVisit<WGSL::AST::Statement> (this=0x7fdc2df03420, x=...) at Source/WebGPU/WGSL/AST/ASTVisitor.h:135 #11 WGSL::AST::Visitor::visit (this=0x7fdc2df03420, compoundStatement=...) at Source/WebGPU/WGSL/AST/ASTVisitor.cpp:479 #12 0x0000559ad3ad7075 in WGSL::AST::ScopedVisitor<WGSL::Binding>::visit (this=0x7fdc2df03420, statement=...) at Source/WebGPU/WGSL/AST/ASTScopedVisitorInlines.h:44 #13 WGSL::TypeChecker::visit (this=0x7fdc2df03420, function=...) at Source/WebGPU/WGSL/TypeCheck.cpp:722 #14 0x0000559ad3b95971 in WGSL::AST::Visitor::checkErrorAndVisit<WGSL::AST::Declaration> (this=0x7fdc2df03420, x=...) at Source/WebGPU/WGSL/AST/ASTVisitor.h:135 #15 WGSL::AST::Visitor::visit (this=0x7fdc2df03420, shaderModule=...) at Source/WebGPU/WGSL/AST/ASTVisitor.cpp:51 #16 0x0000559ad3accfd2 in WGSL::TypeChecker::check (this=0x7fdc2df03420) at Source/WebGPU/WGSL/TypeCheck.cpp:439 #17 0x0000559ad3b0bf60 in WGSL::typeCheck (shaderModule=...) at Source/WebGPU/WGSL/TypeCheck.cpp:2449 #18 0x0000559ad3b7fca1 in WGSL::staticCheck(WTF::String const&, std::optional<WGSL::SourceMap> const&, WGSL::Configuration const&)::$_2::operator()() const (this=<optimized out>) at Source/WebGPU/WGSL/WGSL.cpp:76 #19 WGSL::staticCheck (wgsl=..., configuration=...) at Source/WebGPU/WGSL/WGSL.cpp:76 #20 0x0000559ad3b7e13d in runWGSL (options=...) at Source/WebGPU/WGSL/wgslc.cpp:122 #21 main (argc=<optimized out>, argv=<optimized out>) at Source/WebGPU/WGSL/wgslc.cpp:16
Attachments
Radar WebKit Bug Importer
Comment 1 2024-05-06 08:56:16 PDT
Tadeu Zagallo
Comment 2 2024-05-07 03:56:05 PDT
EWS
Comment 3 2024-05-08 04:31:25 PDT
Committed 278504@main (87a9d5d76bc2): <https://commits.webkit.org/278504@main> Reviewed commits have been landed. Closing PR #28230 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.