Skip to content
This repository was archived by the owner on Jun 27, 2022. It is now read-only.

Force PacketHeader's representation to be predictable #30

Merged
merged 1 commit into from
Jan 4, 2017

Conversation

meqif
Copy link
Owner

@meqif meqif commented Dec 31, 2016

This PR forces the PacketHeader representation to be #[repr(C)]. This fixes an issue where the compiler might reorder the struct's fields, which would mess up the unsafe cast to an array of bytes.

Currently waiting for the new Rust 15.0 beta to be released and tested against master.

Fixes #29

@meqif meqif added the bug label Dec 31, 2016
@codecov-io
Copy link

codecov-io commented Dec 31, 2016

Current coverage is 86.21% (diff: 100%)

Merging #30 into master will increase coverage by 0.94%

@@             master        #30   diff @@
==========================================
  Files            10         10          
  Lines          2607       2510    -97   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits           2223       2164    -59   
+ Misses          384        346    -38   
  Partials          0          0          

Powered by Codecov. Last update e9bf831...6e395af

@meqif meqif merged commit 6e395af into master Jan 4, 2017
@meqif meqif deleted the fix-packet-header-representation branch January 4, 2017 19:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

utp-0.6.3 test suite hangs in Rust 1.15.0-beta.1
2 participants