[PATCH v4] shell: exchange Dijkstra $(( )) evaluator..

Steffen Nurpmeso steffen at sdaoden.eu
Sat Sep 10 13:07:11 UTC 2022


ARGH!!!!

Steffen Nurpmeso wrote in
 <20220909131735.s5lDe%steffen at sdaoden.eu>:
 |P.S.:

ARGH!!!!, II.!

 |Steffen Nurpmeso wrote in
 | <20220906193906.L5sY8%steffen at sdaoden.eu>:
 ||Bernhard Reutner-Fischer wrote in
 || <20220906183821.1f82672d at nbbrfq>:
 |||On Wed, 31 Aug 2022 01:43:26 +0200
 |||Steffen Nurpmeso <steffen at sdaoden.eu> wrote:
 | ...
 |||> +      if(su_64( i > U32_MAX || ) i >= UZ_MAX / 2 ||
 |||
 |||I have to admit that the amount of macro maze makes it really hard to
 |||read ;)
 |  ...
 |
 |Now i remember where this comes from!  The first protects the ++i,
 |as it originally was
 |
 |  if(su_64( i >= U32_MAX || ) ++i >= UZ_MAX / 2)
 |    goto jenomem;
 |
 |and is again here.  Yes!  But

Ok forget about that.  All that: total confusion!

  if(su_64( i >= U32_MAX || ) i++ >= UZ_MAX / 2)
    goto jenomem;

Is it.  It had nothing to do with integer overflow checking, of
course.  And of course for busybox

  if(i++ >= UZ_MAX / 2)
    goto jenomem;

alone is more than sufficient, and already much too large given
that this resides on the stack via alloca(3).

What a mess.
Rest ok.

Now silent.

(Unless v5 cumulation request shows up.)

Promised!

Ciao.  And a nice weekend (if you can).

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


More information about the busybox mailing list