dc's stack breaks when doing modulo-0

Gavin Howard gavin.d.howard at gmail.com
Wed May 8 17:34:28 UTC 2019


> dc -e '4 0 % p' mess up the stack so bad that my MIPS kernel traps it and reboots.
>
> I think we should, like the regular dc, check for 0 as a divider when doing modulo.
>
> //M

Markus,

Was this the full dc or the small dc? As far as I know (I am the
original author of the full dc), the full dc does, in fact, return an
error and not trap.

Gavin Howard


More information about the busybox mailing list