chicken-janitors
[Top][All Lists]
Advanced

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

Re: #1847: integer overflow when running 6.0.0pre1 tests (2)


From: Chicken Trac
Subject: Re: #1847: integer overflow when running 6.0.0pre1 tests (2)
Date: Fri, 31 Jan 2025 13:16:38 -0000

#1847: integer overflow when running 6.0.0pre1 tests (2)
--------------------------------+---------------------
            Reporter:  Erica Z  |      Owner:  (none)
                Type:  defect   |     Status:  new
            Priority:  major    |  Milestone:  someday
           Component:  unknown  |    Version:  6.0.0
          Resolution:           |   Keywords:
Estimated difficulty:  medium   |
--------------------------------+---------------------

Comment (by sjamaan):

 Thanks! With these options I can reproduce the error.

 Note that you still need to use `UBSAN_OPTIONS=halt_on_error=1` to
 actually get the tests to fail (otherwise it just prints a notice and
 continues).

 Having said all this, I'm now very much unsure whether this is even a
 valid bug. We rely heavily on `-fwrapv` to nail down signed overflow
 handling, and I believe that doubly applies in these cases.

 After some searching, I found
 [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102317 this gcc discussion],
 which points to [https://github.com/llvm/llvm-
 project/pull/80089#issuecomment-1945202620 this clang ubsanitizer PR].
 Even there, the folks involved are confused.

 In any case, even from these discussions it's not entirely clear to me how
 `-fwrapv` and `-fsanitize=signed-integer-overflow` are supposed to
 interact. From my reading, they are somewhat mutually exclusive. But
 there's also some nuance in how the sanitizer behaves when `-fwrapv` is
 present. The [https://github.com/llvm/llvm-project/pull/82432 patch that
 eventually landed] even [https://github.com/llvm/llvm-
 project/pull/82432/files#diff-
 ec770381d76c859f5f572db789175fe44410a72608f58ad5dbb14335ba56eb97R404-R409
 explicitly mentions] that users of `-fwrapv` may want to explicitly use
 `-fno-sanitize=signed-integer-overflow` to disable noisy warnings....

-- 
Ticket URL: <https://bugs.call-cc.org/ticket/1847#comment:11>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

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