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: Wed, 18 Dec 2024 12:36:07 -0000

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

Comment (by zerica):

 linking the full ubsan runtime yields more information:

 {{{
 Can hold maximum value 9223372036854775807...
 Can hold minimum value -9223372036854775808...
 chicken.h:2759:39: runtime error: negation of -9223372036854775808 cannot
 be represented in type 'long'; cast to an unsigned type to negate this
 value to itself
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior chicken.h:2759:39
 chicken.h:2701:6: runtime error: implicit conversion from type 'long' of
 value -9223372036854775808 (64-bit, signed) to type 'unsigned long'
 changed the value to 9223372036854775808 (64-bit, unsigned)
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior chicken.h:2701:6
 chicken.h:2704:41: runtime error: negation of -9223372036854775808 cannot
 be represented in type 'long'; cast to an unsigned type to negate this
 value to itself
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior chicken.h:2704:41
 chicken.h:2704:34: runtime error: implicit conversion from type 'long' of
 value -9223372036854775808 (64-bit, signed) to type 'unsigned long'
 changed the value to 9223372036854775808 (64-bit, unsigned)
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior chicken.h:2704:34
 Testing signed FFI type "ssize_t" (64 bits):
 Can hold maximum value 9223372036854775807...
 Can hold minimum value -9223372036854775808...
 Testing unsigned FFI type "size_t" (64 bits):
 Can hold maximum value 18446744073709551615...
 Cannot hold one more than maximum value, 18446744073709551616...
 Cannot hold -1 (any fixnum negative value)
 tests/a.c:9281:50: runtime error: left shift of 18446744073709551615 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:9281:50
 Cannot hold -2^64 (any bignum negative value < smallest int64)
 tests/a.c:8678:16: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:8678:16
 tests/a.c:376:1: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:376:1
 tests/a.c:8636:16: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:8636:16
 tests/a.c:361:1: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:361:1
 tests/a.c:8594:16: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:8594:16
 tests/a.c:346:1: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:346:1
 tests/a.c:8552:16: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:8552:16
 tests/a.c:331:1: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:331:1
 tests/a.c:8510:16: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:8510:16
 tests/a.c:316:1: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:316:1
 tests/a.c:8470:16: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:8470:16
 tests/a.c:301:1: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:301:1
 tests/a.c:8430:16: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:8430:16
 tests/a.c:286:1: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:286:1
 tests/a.c:8390:16: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:8390:16
 tests/a.c:271:1: runtime error: left shift of 18446744073709551606 by 1
 places cannot be represented in type 'unsigned long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/a.c:271:1
 }}}

-- 
Ticket URL: <https://bugs.call-cc.org/ticket/1847#comment:1>
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]