Skip to content

serialization unique id is broken without persistent lifetime #2573

@borisbat

Description

@borisbat

Damage report

can't use intptr_t(object_ptr*) - produces clashes, when programs are compiled\deleted in the middle of serialization loop

Proposed fix

  • use gc_node::gc_id where possible
  • use custom das_hash_map<weak_id, strong_id> for everything else. weak_id is void * of original object, strong id is monotone counter within the serializer

Tests required

  • resurrect -ser -deser tests on the CI
  • undo Boris's changes to dastest etc - to use common serializer for all programs. try with /tests, if too slow narrow down to /tests/language

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions