You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On zig master (first seen in 0.10.0-dev.3978+4fd4c733d), stage2 compilations for some programs implementing getty.Serializer (and getty.Deserializer probably) are going into an infinite loop and running forever crashing.
The problem seems to occur when a method implementation is provided for a required method that contains an anytype parameter (e.g., serializeFloat, serializeInt). This causes the infinite loop crash. Providing implementations for methods like serializeBool or serializeNull still works completely fine.
The problem is apparently inferred error sets. I guess you can't use them anymore when implementing methods that have anytype parameters?
Making the error set explicit fixes this issue.
ibokuri
changed the title
stage2 compilations run forever as of Zig v0.10.0-dev.3978+4fd4c733d
Inferred error sets cause stage2 compilations to run forever
Sep 10, 2022
ibokuri
changed the title
Inferred error sets cause stage2 compilations to run forever
Inferred error sets in required method implementations crashes stage2 compiler
Oct 21, 2022
Description
On
zig
master (first seen in0.10.0-dev.3978+4fd4c733d
), stage2 compilations for some programs implementinggetty.Serializer
(andgetty.Deserializer
probably) aregoing into an infinite loop and running forevercrashing.The problem seems to occur when a method implementation is provided for a required method that contains an
anytype
parameter (e.g.,serializeFloat
,serializeInt
). This causes theinfinite loopcrash. Providing implementations for methods likeserializeBool
orserializeNull
still works completely fine.How to Reproduce the Bug
Works
Doesn't Work
Additional Context
Compiling with stage1 fixes the problem. So if you need a workaround for now, the following should work for you:
The text was updated successfully, but these errors were encountered: