Nadav Har'El
bd742f2951
Merge 'treewide: get rid of incorrect reinterpret casts' from Michał Chojnowski
...
In some places we use the `*reinterpret_cast<const net::packed<T>*>(&x)`
pattern to reinterpret memory. This is a violation of C++'s aliasing rules,
which invokes undefined behaviour.
The blessed way to correctly reinterpret memory is to copy it into a new
object. Let's do that.
Note: the reinterpret_cast way has no performance advantage. Compilers
recognize the memory copy pattern and optimize it away.
Closes #8241
* github.com:scylladb/scylla:
treewide: get rid of unaligned_cast
treewide: get rid of incorrect reinterpret casts
2021-03-18 11:24:18 +01:00
..
2021-03-11 12:17:13 +02:00
2021-03-18 11:15:59 +02:00
2020-03-06 13:33:53 +01:00
2020-06-02 09:12:21 +03:00
2020-07-21 10:33:49 -07:00
2020-07-20 10:57:38 +03:00
2020-08-21 14:58:40 +03:00
2021-03-18 11:15:59 +02:00
2021-03-14 14:31:26 +02:00
2020-08-19 11:34:13 +03:00
2021-03-10 12:02:12 -03:00
2021-03-11 09:29:59 -03:00
2021-03-11 09:29:59 -03:00
2020-10-12 21:49:25 +02:00
2020-08-26 20:44:11 +03:00
2020-11-17 16:53:20 +01:00
2020-06-16 16:14:30 +02:00
2020-08-26 11:33:23 +03:00
2020-03-23 09:29:45 +02:00
2020-03-23 09:29:45 +02:00
2020-03-23 09:29:45 +02:00
2020-03-23 09:29:45 +02:00
2021-03-18 11:15:59 +02:00
2021-02-04 15:24:07 +01:00
2020-08-19 17:18:57 +03:00
2020-08-09 12:04:36 +03:00
2020-03-03 11:34:00 +01:00
2021-03-10 12:02:12 -03:00
2020-06-18 09:37:18 -04:00
2020-09-21 16:32:53 +03:00
2019-01-22 15:34:32 +02:00
2020-10-12 20:38:11 +03:00
2020-10-12 20:36:10 +03:00
2021-01-08 14:16:08 +01:00
2020-10-14 19:51:26 +03:00
2019-06-19 14:29:02 +02:00
2020-06-29 14:23:48 -03:00
2020-07-27 11:23:48 -07:00
2021-03-18 11:15:59 +02:00
2020-07-05 19:40:48 +03:00
2020-07-05 19:40:48 +03:00
2021-03-18 11:15:59 +02:00
2019-03-26 16:05:08 +02:00
2021-03-02 13:21:22 +02:00
2020-09-21 16:32:53 +03:00
2021-03-10 12:02:12 -03:00
2020-08-19 17:19:01 +03:00
2021-01-16 20:03:17 +08:00
2021-01-16 20:03:17 +08:00
2021-03-11 12:17:13 +02:00
2021-03-11 12:17:13 +02:00
2021-03-18 11:15:59 +02:00
2021-03-18 11:15:59 +02:00
2021-03-17 09:59:22 +02:00
2020-08-10 18:53:04 +03:00
2021-03-01 07:49:23 +02:00
2021-02-01 16:45:52 +02:00
2021-03-17 17:00:38 +01:00
2021-03-11 12:17:13 +02:00
2021-01-27 17:38:17 +02:00
2021-02-24 15:12:40 +02:00
2020-12-18 16:33:27 +01:00
2021-02-01 16:45:52 +02:00
2021-01-24 10:38:55 +02:00
2021-03-01 07:49:23 +02:00
2021-01-11 09:12:56 +02:00
2021-03-17 17:00:38 +01:00