Skip to content

[3.x] ObjectIDs stored as 32 bit intermediates #107616

Open
@lawnjelly

Description

@lawnjelly

Tested versions

All 3.x up to 6c3f393 at least.

System information

All

Issue description

In 3.x, ObjectID is 64 bit, however it turns out there are a few places that are storing / passing these ids as 32 bit values.

This can lead to haywire behaviour when ObjectID overflows 32 bit due to object churn (the id is currently incremented on each new object).

Steps to reproduce

Examples:

Minimal reproduction project (MRP)

N/A

Discussion

4.x moved over to using an ObjectID class, and it may be worth trying to see whether this is possible in 3.x to catch these errors at compile time, as otherwise these kind of bugs are difficult to track down in an automated way. I tried this a while back but got stuck, but it may be worth perservering.

4.x version:
"ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits."
cf8c679
So the 32 bit bugs were noticed but never fixed in 3.x.

I noticed this during a rewrite of ObjectDB which requires the full 64 bits, and it was detecting these errors where the values were being truncated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    In progress / Assigned

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions