Commit a40ae31a authored by Marius Wachtler's avatar Marius Wachtler

Fix a rewriter bug by disabling the rewriter in a special case.

I encountered this issue sometimes with the protobuf integration test.
parent f673aa7b
...@@ -970,10 +970,12 @@ void Rewriter::_call(RewriterVar* result, bool has_side_effects, void* func_addr ...@@ -970,10 +970,12 @@ void Rewriter::_call(RewriterVar* result, bool has_side_effects, void* func_addr
assert(assembler->hasFailed() || asm_address == (uint64_t)assembler->curInstPointer()); assert(assembler->hasFailed() || asm_address == (uint64_t)assembler->curInstPointer());
} }
assert(vars_by_location.count(assembler::RAX) == 0); if (!failed) {
result->initializeInReg(assembler::RAX); assert(vars_by_location.count(assembler::RAX) == 0);
result->initializeInReg(assembler::RAX);
assertConsistent(); assertConsistent();
}
result->releaseIfNoUses(); result->releaseIfNoUses();
} }
......
...@@ -932,6 +932,8 @@ static Box* typeCallInner(CallRewriteArgs* rewrite_args, ArgPassSpec argspec, Bo ...@@ -932,6 +932,8 @@ static Box* typeCallInner(CallRewriteArgs* rewrite_args, ArgPassSpec argspec, Bo
rewrite_args->rewriter->call(true, (void*)assertInitNone, srewrite_args.out_rtn); rewrite_args->rewriter->call(true, (void*)assertInitNone, srewrite_args.out_rtn);
} }
} else { } else {
rewrite_args = NULL;
init_attr = processDescriptor(init_attr, made, cls); init_attr = processDescriptor(init_attr, made, cls);
ArgPassSpec init_argspec = argspec; ArgPassSpec init_argspec = argspec;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment