Re: [PATCH] left shift of negative value do_binop src/arith_yacc.c:111:12
Steffen Nurpmeso <[email protected]> Wed, 20 Aug 2025 13:33:44 +0200
| Newsgroups | org.kernel.vger.dash |
|---|---|
| Message-ID | <20250820113344.cw2oHltI@steffen%sdaoden.eu> |
Steffen Nurpmeso wrote in <20250820112753.FJo-4m6j@steffen%sdaoden.eu>: |Harald van Dijk wrote in | <[email protected]>: ||On 20/08/2025 01:33, Aleksander Ushakov wrote: ||> Well, if we take bash with UBSAN instrumentation and try to use a ... ||I did that in my own version back in 2019, with the exception of subtly ... ||<https://github.com/hvdijk/gwsh/commit/c4d6f1b1613c228db1e157a2136c53f55\ ||b4530c8>. ||As those commits show, there are quite a few more cases to consider than ||left shifts of negative values. | |We (i am only a MUA though, since busybox did not take the code, |and kept their broken implemenation; will try again at some time) |all return -2 for "-1 << 1", at least on this hardware etc etc. |You then return 0 from looking at the commitdiff!?! ah no forget that rubbish, the test is about rval. ... --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)