ContestNode.Ref: panic: switch on corrupt value #11
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
maleszka/wbij#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
logic backend in wbij is designed in such a way that whenever some cache entry is incorrect (corrupted, altered by user, whatever), this entry (relation tuple) should be discarded and redownloaded by the appropriate fetcher
The problem currently is that
ContestNode.Refcan be anyu64(so any 64 bits) but in both sim and satori implementation, they are bitCasted to a packed struct, whose one of the fields is enum. It means that not all 64bit sequences are valid. Currently,wbijcrashes on invalid ref (which is better than silently continuing) but I believe it should at least result in an error (cause then we can safely free resources, etc.)