-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Check usage for verbose formatting of instructions in crashes #4145
Comments
In #4198, I got a stack trace from Formatter while trying to debug an interface crash. I'm trying to make the formatter more robust as a consequence. Note what I saw was actually a little quirky, with both stack traces and both CHECK messages, I think because of how CHECK works. But then I was trying to figure out what exactly was going on, it's pretty misleading to have the crash in formatter.
|
The prior code crashed when trying to find the function's `Self` parameter, I believe. `fail_redefine_with_dependents.carbon` handles this case. It wasn't caught by the prior case because the `F` didn't have any dependent parameters. Note this also ran into a formatter crash, with invalid constants. I'm fixing that here, but will also note it on #4145 (the crash in FinishGenericDecl was muddled by a crash in Formatter code).
I just ran into a similar issue, where the stack trace pretty-printer crashed in the formatter, giving me both stack traces and both CHECK failures, and it derailed my debugging for a little while. For what it's worth, I've frequently found it to be helpful when the stack trace shows the Carbon code that was being processed at the time of the crash, but I'm not sure if that's in scope for this issue. |
Correct. This is really about printing of textual IR for inst IDs; I think what you're describing is the printing of lines of code for node IDs. |
#4125 added verbose formatting of instructions in crashes. If it's not used, or it gets in the way (a crash during a pretty printing) we might want to roll it back. This issue is to help track whether it's in use.
For example, this is the
%<unexpected>
formatted SemIR in the example crash output:Please comment here if you either:
SIGSEGV
after argument printing and beforeCheck::Context
printing (which is symptomatic of a crash during the formatting, and could be worked around by just commenting it out temporarily).The text was updated successfully, but these errors were encountered: