Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brillig linking could result in code segments being overwritten #1638

Closed
kevaundray opened this issue Jun 12, 2023 · 3 comments
Closed

Brillig linking could result in code segments being overwritten #1638

kevaundray opened this issue Jun 12, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request refactor ssa

Comments

@kevaundray
Copy link
Contributor

Problem

See here

When we are linking two independent artifacts, it could be the case that their labels collide and one artifact overwrites the labels in another artifact.

A traditional linker may error here or in some cases just issue a warning.

Happy Case

We should provide an error here and in order to ensure that the labels are unique, we can add the function ID and possibly the name to the label, instead of just the basic block ID

Alternatives Considered

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@kevaundray
Copy link
Contributor Author

kevaundray commented Jun 12, 2023

This may be more helpful if it was stateful, ie when we are in a particular block, and we add a label, it will automatically prepend the function id and block. Then when you exit the block, you "pop off" that block from the label stack.

We may be able to get rid of relative jumps in that case, since we can just label everything

@kevaundray
Copy link
Contributor Author

@sirasistant what is the status of this issue?

@sirasistant
Copy link
Contributor

It was done in #1652, It didn't auto close because it was merged to a branch that we used as a batch merge to master. Closing this!

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor ssa
Projects
Archived in project
Development

No branches or pull requests

2 participants