Skip to content

Award calculation crashes with ZeroDivisionError on zero denominator #578

Description

@sdghsdkjlas27-dotcom

The div operation in BTerm#calc (award.rb line 195) performs division without checking for a zero divisor. If the denominator evaluates to 0, Ruby raises ZeroDivisionError, crashing the award calculation mid-process.

REPRODUCTION: Create an award query like '(award (give (div x 0) "test"))' with x set to any value, or ensure the denominator variable resolves to 0.

IMPACT: Unhandled ZeroDivisionError crashes the judge, potentially leaving the system in an inconsistent state where awards are partially computed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions