bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UBSAN error in lib/sh/random.c:79


From: Chet Ramey
Subject: Re: UBSAN error in lib/sh/random.c:79
Date: Tue, 10 Jan 2023 14:23:19 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

On 1/10/23 11:43 AM, Greg Wooledge wrote:
On Sat, Jan 07, 2023 at 01:42:20PM -0500, Greg Wooledge wrote:
Or should the code do the multiplications with unsigned
values, store them in unsigned variables, and then replace the subtraction
with some kind of conditional that checks which of the two is greater?

Here's a version that does just that:

Thanks, I pushed what I think is a simpler fix that should work fine.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]