| Summary: | Floating point exception - Fuzz Testing | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Fernando Muñoz <fernando> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.21.x | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
Fernando Muñoz
2014-11-06 20:25:29 UTC
The same happens in bash.
The cause is that MAX_NEGATIVE_INT / -1 = MAX_POSITIVE_INT+1 and thus is not representable. Therefore these ops fail:
rez /= right_side_val;
rez %= right_side_val;
They dont fail in 32-bit case because 64-bit wide divide in 32-bit case is handled as a several divides of smaller width. The result is wrong, though (since correct result is not representable),
Fixed in git. Thanks!
|