-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
asmparser doesn't detect errors soon enough #1274
Comments
This seems to be a logic error in the AsmParser. The affected code is this InstVal : ArithmeticOps Types ValueRef ',' ValueRef { For some reason the second getVal call is ending up not liking the IntTy first assert(Ty == Type::DoubleTy) llvm::ConstantFP::get(const llvm::Type*, double) In this case, Ty == Type::IntTy. That's all the analysis I have time for right now. |
The reason this crashes is as follows: This line: calls: getVal("int", "1") Then it calls: getVal("int", "2.0") Which calls GenerateError on line 319:
However, GenerateError returns, which then falls into the next line: GenerateError should not return. -Chris |
Yeah, I think I see the problem. YYERROR can't be used inside getVal because it |
Fixed with this patch: Errors are generated with the YYERROR macro which can only be called from |
Extended Description
This input crashes the asmparser. This is a regression from the EH removal patches.
void %test() {
add int 1, 2.0
ret void
}
Perhaps we need a sj/lj solution for the asmparser?
-Chris
The text was updated successfully, but these errors were encountered: