From: Patrick Steinhardt Date: Wed, 29 Oct 2025 09:07:59 GMT Subject: Re: [PATCH 03/14] hash: use uint32_t for object_id algorithm Message-ID: In-Reply-To: On Wed, Oct 29, 2025 at 12:33:30AM +0000, brian m. carlson wrote: > On 2025-10-28 at 09:16:57, Patrick Steinhardt wrote: > > An alternative would be to introduce an enum and set up bindgen so that > > we can pull this enum into Rust. I'd personally favor that over using an > > uint32_t as it conveys way more meaning. Have you considered this? > > That would lead to problems because we zero-initialize some object IDs > (and you see later in the series what problems that causes) and that > will absolutely not work in Rust, since setting an enum to an invalid > value is undefined behaviour. We could of course try and represent the uninitialized state with a third enum state. But it would probably make things awfully unergonomic all over the place :/ Patrick