[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: UBSAN errors in tinfo/read_entry.c's convert_32bits
From: |
Thomas Dickey |
Subject: |
Re: UBSAN errors in tinfo/read_entry.c's convert_32bits |
Date: |
Fri, 6 Jan 2023 16:37:44 -0500 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Fri, Jan 06, 2023 at 09:29:55AM +0000, Sam James wrote:
> Hi,
>
> When building ncurses 6.4 with UndefinedBehaviorSanitizer
> (-fsanitize=undefined),
> I got the following when running `tput capname` (it happens during various
> real world
> invocations of ncurses but this is the simplest);
> ```
> $ export UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=0
> $ tput capname
> /var/tmp/portage/sys-libs/ncurses-6.4/work/ncurses-6.4/ncurses/tinfo/read_entry.c:92:24:
> runtime error: left shift of 255 by 24 places cannot be represented in type
> 'int'
I suppose masking before the shift might appease it (will investigate).
Knowing the version of gcc might help, in case that relates to the version
of UBSAN.
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
signature.asc
Description: PGP signature