Skip to content

Test tracking across shared libraries - #388

Merged
gennaroprota merged 2 commits into
developfrom
test/tracking-across-shared-libraries
Oct 28, 2026
Merged

gennaroprota merged 2 commits into
developfrom
test/tracking-across-shared-libraries

Conversation

@gennaroprota

@gennaroprota gennaroprota commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

This adds two tests, one per commit.

Closes #183.

Whether a type is tracked is settled per module, so an archive can get
the same type from serializers which disagree about it. Up to Boost
1.83, the tracking level stored for the type came from the serializer
which saved its first object, while each object id followed the
serializer at hand, so the archive could contradict itself (#183). "Use
the first instance of bos during serialization (for the case when there
are multiple instances)" fixed that and broke the opposite order (#329),
which "Record the first-registered serializer's tracking flag on save"
fixed in turn. Neither change came with a test.

I've added one, which covers both orders and fails if either change is
reverted.

Closes #183.
A type tracked selectively is tracked by a program which serializes it
through a pointer, and not by one which doesn't, so the program reading
an archive may disagree with the one which wrote it. Loading takes the
tracking level stored in the archive, which settles that, but nothing
tested it.

I've added a test which writes an archive in one program and reads it in
another, which serializes the type through a pointer.

Refs #183.
@gennaroprota
gennaroprota added this pull request to the merge queue Oct 28, 2026
Merged via the queue into develop with commit 2098825 Oct 28, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Boost serialization (bug?) issue with MSVC, with vector<shared_ptr> in several libraries

1 participant