~sircmpwn/hare#687: 
Struct sub-typing tutorial infinite loop

When running the Struct sub-typing tutorial, the program hangs. This reproduces by copying the code into a text file and calling hare run on it.

I am running Hare v20220328-2927-gf955d4e1ab-alpine.

Some debugging shows that the limit_write function is being called repeatedly.

Status
RESOLVED FIXED
Submitter
~gbear605
Assigned to
No-one
Submitted
2 years ago
Updated
2 years ago
Labels
No labels applied.

~gbear605 2 years ago

Beyond that, the instantiation of the limitstream struct uses the ... syntax (on line 22), which seems to not be needed since all of the fields are set manually.

It also might be helpful to explain what that syntax does, since it's unclear to a learner whether it sets a default value (which would make sense) or if it copies the value last set like how the same syntax works for arrays.

~sircmpwn 2 years ago

This was because fmt was updated (incorrectly) to use io::writeall, which retried indefinitely on short writes.

~sircmpwn REPORTED FIXED 2 years ago

Register here or Log in to comment, or comment via email.