Derecho-Project / derecho

The main code repository for the Derecho project.
BSD 3-Clause "New" or "Revised" License
187 stars 47 forks source link

Replace all uses of char* for "byte arrays" with uint8_t* #223

Closed etremel closed 2 years ago

etremel commented 2 years ago

As documented in issue #218, Derecho doesn't use the correct type for raw buffers of bytes (e.g. the RDMA send and receive buffers, and serialized objects). I replaced all instances of "char arrays" (including char*, char[], and char const * const) with the equivalent array of type uint8_t, except for the few cases where the char array actually did represent a C-style string.

I have thoroughly tested this code with both bandwidth_test (for basic functionality) and view_change_test (for failure and recovery), and it does not seem to have introduced any new bugs despite the extensive changes. Once this is merged to master, and I build Cascade on it, I can hopefully eliminate a source of bugs in CascadeChain.