Skip to content

Fix issue 15: synchronize data races in rdfloader#16

Open
bbadour wants to merge 2 commits intospdx:masterfrom
bbadour:race
Open

Fix issue 15: synchronize data races in rdfloader#16
bbadour wants to merge 2 commits intospdx:masterfrom
bbadour:race

Conversation

@bbadour
Copy link

@bbadour bbadour commented Dec 7, 2025

Use sync/atomic to synchronize the Node.lastid accesses, and the
existing Parser.writeLock to synchronize accesses to the deferenced
error pointer.

Introduce a package-private Node.set method to support initializing
lastid to different values.

Sort the unique triples in GetNodeToTriples to make the order
determinate.

Add logging to topological sort test to aid debugging.
Use `sync/atomic` to synchronize the `Node.lastid` accesses, and the
existing `Parser.writeLock` to synchronize accesses to the deferenced
error pointer.

Introduce a package-private `Node.set` method to support initializing
`lastid` to different values.
@bbadour
Copy link
Author

bbadour commented Dec 7, 2025

Didn't mean to make the fix for 14 a child of the fix for 12/13, but my git-foo is inadequate to figure out how to rebase the pull request here. 🤷

@bbadour bbadour changed the title Fix issue 14: synchronize data races in rdfloader Fix issue 15: synchronize data races in rdfloader Dec 7, 2025
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.

1 participant