Skip to content

CodeGen: Don't assert when printing null GlobalAddress operands #115531

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

Merged

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented Nov 8, 2024

No description provided.

Copy link
Contributor Author

arsenm commented Nov 8, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@arsenm arsenm marked this pull request as ready for review November 8, 2024 18:33
Copy link
Collaborator

@qcolombet qcolombet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this is for mir files.
I ran into this problem in the past.

LGTM, but could you add a mir test and here add a comment that specifically says that this shouldn't be the state of a well formed ir. (Unless you're fixing a real bug, and then we are missing a test anyway)

@arsenm
Copy link
Contributor Author

arsenm commented Nov 13, 2024

I'm guessing this is for mir files. I ran into this problem in the past.

LGTM, but could you add a mir test and here add a comment that specifically says that this shouldn't be the state of a well formed ir. (Unless you're fixing a real bug, and then we are missing a test anyway)

I don't think this can be constructed from MIR. A literal 0 won't parse as a GlobalAddress

@qcolombet
Copy link
Collaborator

I'm guessing this is for mir files. I ran into this problem in the past.
LGTM, but could you add a mir test and here add a comment that specifically says that this shouldn't be the state of a well formed ir. (Unless you're fixing a real bug, and then we are missing a test anyway)

I don't think this can be constructed from MIR. A literal 0 won't parse as a GlobalAddress

So how do you run into this problem?

It sounds to me that we shouldn't produce nullptr for GlobalAddress in a normal compilation flow.

@arsenm
Copy link
Contributor Author

arsenm commented Nov 16, 2024

So how do you run into this problem?

Bugs

It sounds to me that we shouldn't produce nullptr for GlobalAddress in a normal compilation flow.

Yes, but this is in debug printing. -debug causing new crashes to appear is a bad property

@qcolombet
Copy link
Collaborator

So how do you run into this problem?

Bugs

It sounds to me that we shouldn't produce nullptr for GlobalAddress in a normal compilation flow.

Yes, but this is in debug printing. -debug causing new crashes to appear is a bad property

Fair enough.
Could you add a comment that says that this is for debug printing?

@arsenm arsenm merged commit e9dc6c5 into main Dec 4, 2024
5 of 8 checks passed
@arsenm arsenm deleted the users/arsenm/machine-operand-null-check-printing-globaladdress branch December 4, 2024 00:15
MaskRay added a commit that referenced this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants