Page MenuHomePhabricator

Internal error from modulo by float-y zero
Closed, ResolvedPublic

Description

Steps to Reproduce:

Run:

1%0.1

Actual Results:

{
    "error": {
        "code": "internal_api_error_DivisionByZeroError",
        "info": "[XcHikwpAIDcAALo1nmcAAACB] Caught exception of type DivisionByZeroError",
        "errorclass": "DivisionByZeroError"
    },
    "servedby": "mw1343"
}

Expected Results:

Not an internal error

Details

Related Gerrit Patches:
mediawiki/extensions/AbuseFilter : masterCheck for 0-like floats passed to the modulo operator

Event Timeline

Nullzero created this task.Nov 5 2019, 9:00 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 5 2019, 9:00 PM

It seems I used a wrong bug reporting form. Sorry :/

Daimona added a subscriber: Daimona.Nov 6 2019, 9:12 AM

Curious, I thought I had fixed this back in rEABF9144f20245fc07ab177f6e7a39ddb26d01c94f63. Should be another easy fix anyway.

It seems I used a wrong bug reporting form. Sorry :/

Is it? Seems fine to me :)

Change 548971 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Check for floats 0<=x<1 passed to the modulo operator

https://gerrit.wikimedia.org/r/548971

Daimona claimed this task.Nov 6 2019, 9:19 AM

Curious, I thought I had fixed this back in rEABF9144f20245fc07ab177f6e7a39ddb26d01c94f63.

(Actually, that was just for 0.0)

@Daimona : also, timestamp % 0 currently passes Check Syntax. Does it make sense to include the fix in this patch too?

@Daimona : also, timestamp % 0 currently passes Check Syntax. Does it make sense to include the fix in this patch too?

Hah, thanks for reporting. No, I'd say that should be included in T234339 (as it's the same kind of bug)

Change 548971 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Check for 0-like floats passed to the modulo operator

https://gerrit.wikimedia.org/r/548971

Nullzero closed this task as Resolved.Nov 10 2019, 11:55 AM
Nullzero removed a project: Patch-For-Review.