Mailing List Archive

[Bug 2410] integer overflow macros.h
https://bugs.exim.org/show_bug.cgi?id=2410

Jeremy Harris <jgh146exb@wizmail.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|nigel@exim.org |jgh146exb@wizmail.org
Status|NEW |ASSIGNED

--- Comment #1 from Jeremy Harris <jgh146exb@wizmail.org> ---
Thanks for the report. If in the definition of DEBUG_BIT you add a cast of the
result of BIT() to (int), does that pass the compiler check?

For my background interest - what hardware and Solaris version? Are you
interested in running a buildfarm member, so that 32b regressions like this are
spotted early?

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2410] integer overflow macros.h [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2410

Johannes Berg <johannes@sipsolutions.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |johannes@sipsolutions.net

--- Comment #2 from Johannes Berg <johannes@sipsolutions.net> ---
(In reply to Jeremy Harris from comment #1)
> Thanks for the report. If in the definition of DEBUG_BIT you add a cast of
> the result of BIT() to (int), does that pass the compiler check?

It seems to me that this was already fixed by your

commit bd83c6f989cac6318ee32af3e34d3f5e69b27100
Author: Jeremy Harris <jgh146exb@wizmail.org>
Date: Thu Apr 25 10:26:46 2019 +0100

Use unsigned when creating bitmasks in macros


since 1<<31 is undefined behaviour in C on 32-bit (so not surprising that a
compiler might warn about it, if not, UBsan would flag it). But it's not
1U<<31, so should be fine (fits into 32 bits).

(Also reported against 4.92, which doesn't have your fix afaict)

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2410] integer overflow macros.h [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2410

Jeremy Harris <jgh146exb@wizmail.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED

--- Comment #3 from Jeremy Harris <jgh146exb@wizmail.org> ---
Closing on the assumption that bd83c6f9 does fix it.
Please re-open if needed.

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##