Jeff Epler
413f34cd8f
all: Fix signed shifts and NULL access errors from -fsanitize=undefined.
...
Fixes the following (the line numbers match commit 0e87459e2bfd07):
../../extmod/crypto-algorithms/sha256.c:49:19: runtime error: left shif...
../../extmod/moduasyncio.c:106:35: runtime error: member access within ...
../../py/binary.c:210:13: runtime error: left shift of negative value -...
../../py/mpz.c:744:16: runtime error: negation of -9223372036854775808 ...
../../py/objint.c:109:22: runtime error: left shift of 1 by 31 places c...
../../py/objint_mpz.c:374:9: runtime error: left shift of 4611686018427...
../../py/objint_mpz.c:374:9: runtime error: left shift of negative valu...
../../py/parsenum.c:106:14: runtime error: left shift of 46116860184273...
../../py/runtime.c:395:33: runtime error: left shift of negative value ...
../../py/showbc.c:177:28: runtime error: left shift of negative value -...
../../py/vm.c:321:36: runtime error: left shift of negative value -1```
Testing was done on an amd64 Debian Buster system using gcc-8.3 and these
settings:
CFLAGS += -g3 -Og -fsanitize=undefined
LDFLAGS += -fsanitize=undefined
The introduced TASK_PAIRHEAP macro's conditional (x ? &x->i : NULL)
assembles (under amd64 gcc 8.3 -Os) to the same as &x->i, since i is the
initial field of the struct. However, for the purposes of undefined
behavior analysis the conditional is needed.
Signed-off-by: Jeff Epler <jepler@gmail.com>
2021-06-24 23:01:04 +10:00
..
2021-04-27 23:51:52 +10:00
2021-06-05 11:03:04 +10:00
2021-06-05 11:03:04 +10:00
2020-02-28 10:33:03 +11:00
2020-02-28 10:33:03 +11:00
2021-06-05 11:03:04 +10:00
2021-06-05 11:03:04 +10:00
2021-05-20 23:43:25 +10:00
2020-06-27 00:24:04 +10:00
2020-06-27 00:24:04 +10:00
2020-06-27 00:24:04 +10:00
2020-02-28 10:33:03 +11:00
2020-06-27 00:24:04 +10:00
2020-02-28 10:29:32 +11:00
2021-04-27 23:51:52 +10:00
2020-09-11 17:22:28 +10:00
2021-06-24 23:01:04 +10:00
2020-03-26 01:25:45 +11:00
2020-04-05 15:02:06 +10:00
2020-02-28 10:33:03 +11:00
2021-05-30 19:35:03 +10:00
2021-05-30 10:38:48 +10:00
2021-04-28 00:06:46 +10:00
2020-04-05 14:13:02 +10:00
2020-02-28 10:33:03 +11:00
2021-02-04 22:46:42 +11:00
2021-06-05 11:03:04 +10:00
2021-01-29 23:57:10 +11:00
2020-10-22 11:47:36 +02:00
2021-05-20 23:43:25 +10:00
2019-12-12 20:15:28 +11:00
2020-04-18 22:42:24 +10:00
2020-02-28 10:33:03 +11:00
2021-06-18 14:15:37 +10:00
2021-02-05 15:46:56 +11:00
2020-06-16 23:18:01 +10:00
2020-10-22 11:53:16 +02:00
2020-06-16 22:02:24 +10:00
2020-04-20 10:32:49 +10:00
2020-08-29 15:18:01 +10:00
2020-02-28 10:33:03 +11:00
2020-11-12 15:04:53 +11:00
2021-01-31 17:48:59 +01:00
2020-02-28 10:33:03 +11:00
2020-10-10 00:16:26 +11:00
2021-04-27 23:51:52 +10:00
2021-05-12 13:22:13 +10:00
2021-05-23 00:00:39 +10:00
2020-12-14 13:57:15 +11:00
2020-02-28 10:33:03 +11:00
2021-04-27 23:51:52 +10:00
2020-04-23 11:24:25 +10:00
2020-02-28 10:33:03 +11:00
2020-02-28 10:33:03 +11:00
2021-03-26 13:48:34 +11:00
2020-12-14 13:30:56 +11:00
2021-05-10 13:07:16 +10:00
2020-04-05 15:02:06 +10:00
2020-05-28 10:02:14 +10:00
2021-06-19 09:43:44 +10:00
2020-04-23 11:24:25 +10:00
2021-06-18 16:38:06 +10:00
2020-09-18 17:20:34 +10:00
2020-12-07 23:32:06 +11:00
2020-02-28 10:33:03 +11:00
2021-06-19 09:49:00 +10:00
2020-02-28 10:33:03 +11:00
2021-06-24 23:01:04 +10:00
2020-03-11 14:34:40 +11:00
2020-04-18 22:36:14 +10:00
2020-05-14 21:48:05 +10:00
2020-02-28 10:33:03 +11:00
2021-03-11 12:51:10 +11:00
2021-05-18 11:46:30 +10:00
2020-02-28 10:33:03 +11:00
2020-02-28 10:33:03 +11:00
2021-05-18 11:52:00 +10:00
2020-02-28 10:33:03 +11:00
2020-02-28 10:33:03 +11:00
2021-04-27 23:51:52 +10:00
2021-04-27 23:51:52 +10:00
2021-05-18 10:18:56 +10:00
2020-09-25 12:23:11 +10:00
2020-02-28 10:33:03 +11:00
2020-02-28 10:33:03 +11:00
2020-02-28 10:33:03 +11:00
2020-02-28 10:33:03 +11:00
2021-03-26 13:48:34 +11:00
2020-06-27 01:03:10 +10:00
2020-04-05 15:02:06 +10:00
2021-03-26 13:48:34 +11:00
2020-02-28 10:33:03 +11:00
2021-04-27 23:51:52 +10:00
2020-02-28 10:33:03 +11:00
2021-02-04 22:46:42 +11:00
2021-01-29 23:57:10 +11:00
2020-06-30 23:55:32 +10:00
2021-03-26 13:48:34 +11:00
2020-05-28 10:02:14 +10:00
2020-11-11 22:18:24 +11:00
2021-06-24 23:01:04 +10:00
2020-05-28 10:02:14 +10:00
2020-04-05 15:02:06 +10:00
2020-09-04 00:10:24 +10:00
2020-02-11 15:43:13 +11:00
2021-04-27 23:51:52 +10:00
2020-01-13 01:01:45 +11:00
2020-04-05 15:02:06 +10:00
2020-02-28 10:33:03 +11:00
2021-03-26 13:48:34 +11:00
2020-10-22 11:53:16 +02:00
2019-12-27 12:53:36 +11:00
2020-04-13 22:19:37 +10:00
2021-04-27 23:51:52 +10:00
2020-02-28 10:33:03 +11:00
2020-04-05 15:02:06 +10:00
2020-12-07 23:32:06 +11:00
2020-04-05 15:02:06 +10:00
2020-02-28 10:33:03 +11:00
2021-04-27 23:51:52 +10:00
2019-12-27 12:34:22 +11:00
2020-01-09 11:25:26 +11:00
2020-03-26 01:21:04 +11:00
2020-03-26 01:21:04 +11:00
2020-10-01 15:26:43 +10:00
2020-09-11 23:00:03 +10:00
2021-04-27 23:51:52 +10:00
2020-02-28 10:33:03 +11:00
2021-02-04 22:46:42 +11:00
2019-12-12 20:15:28 +11:00
2021-06-19 09:43:44 +10:00
2020-02-28 10:33:03 +11:00
2021-04-09 13:08:35 +10:00
2021-03-11 12:51:10 +11:00
2020-02-28 10:33:03 +11:00
2020-02-28 10:33:03 +11:00
2020-04-05 15:02:06 +10:00
2021-01-30 13:40:48 +11:00
2020-02-28 10:31:07 +11:00
2020-02-28 10:33:03 +11:00
2021-05-30 11:50:51 +10:00
2019-11-21 12:04:53 +11:00
2020-06-05 14:04:20 +10:00
2019-12-12 20:15:28 +11:00
2021-06-24 23:01:04 +10:00
2021-04-30 15:13:43 +10:00
2021-06-19 09:49:00 +10:00
2020-10-22 11:40:56 +02:00
2020-10-22 11:40:56 +02:00
2020-04-05 15:02:06 +10:00
2021-06-24 23:01:04 +10:00
2021-06-24 23:01:04 +10:00
2020-02-28 10:33:03 +11:00
2021-06-05 11:03:09 +10:00
2020-04-27 23:58:46 +10:00
2020-03-25 01:00:52 +11:00
2020-02-28 10:33:03 +11:00
2021-03-31 00:26:01 +11:00
2021-06-24 23:01:04 +10:00
2020-10-22 11:47:36 +02:00
2020-02-28 10:33:03 +11:00