On i386 we see occasional crashes when the register

context is not returning valid registers yet.  Don't
crash in these situations.

<rdar://problem/11650335>

llvm-svn: 159885
This commit is contained in:
Sean Callanan 2012-07-07 01:38:30 +00:00
parent 7820bd1e52
commit a0d17365ab
1 changed files with 2 additions and 0 deletions

View File

@ -272,6 +272,8 @@ ABIMacOSX_i386::PrepareTrivialCall (Thread &thread,
// the actual register it pertains to is not important, just the size needs
// to be correct. Here we use "eax"...
const RegisterInfo *reg_info_32 = reg_ctx->GetRegisterInfoByName("eax");
if (!reg_info_32)
return false; // TODO this should actually never happen
// Make room for the argument(s) on the stack