Make QuicFrame a standard-layout struct.
C++ provides certain guarantees about the way union fields interact, which are only valid for standard-layout types. Standard-layout types are not allowed to have data members in both base and derived types; this fixes that by moving QuicInlinedFrame::type into individual frames.
Also, before C++17, using offsetof() on non-standard-layout types is undefined behavor.
Thanks to Stephan Hartmann <stha09@googlemail.com> for pointing this problem out in <https://quiche-review.googlesource.com/c/quiche/+/10600>.
PiperOrigin-RevId: 320195673
Change-Id: I179634af3e3a199b7b7320a031b42898a5644824
10 files changed