LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1117 - Assembler doesn't catch bad casts.
Summary: Assembler doesn't catch bad casts.
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: LLVM assembly language parser (show other bugs)
Version: trunk
Hardware: All All
: P normal
Assignee: Reid Spencer
URL:
Keywords: crash-on-invalid, regression
Depends on:
Blocks:
 
Reported: 2007-01-16 11:52 PST by Reid Spencer
Modified: 2010-02-22 12:45 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reid Spencer 2007-01-16 11:52:53 PST
The AsmParser isn't catching illegal casts and reporting them as errors. This
causes llvm-as to fail with an assertion when the attempt is made to instantiate
the illegal cast instruction.  For example:

%X = trunc i32 %Y to i8*

The instruction needed here is inttoptr, not trunc. This causes an assertion
instead of a nice error message.
Comment 1 Reid Spencer 2007-01-16 16:04:53 PST
Mine.