RFR(S): 8206075: add assertion for unbound assembler Labels for x86

Liu Xin navy.xliu at gmail.com
Wed Jul 18 07:31:42 UTC 2018


I made a special built which intentionally disables 'compile1' and enable
assertion.
I ran hs-tier1 and the result has 11 failures, but they are not related to
the Label dtor. I think it tested c2 quite much on x86_64.

i) for c2 bailout case, I think the array of labels here are suspicious.
void Compile::fill_buffer(CodeBuffer* cb, uint* blk_starts)  in
opto/output.cpp

1124  // Create an array of labels, one for each basic block
1125:  Label *blk_labels = NEW_RESOURCE_ARRAY(Label, nblocks+1);

These labels may abort early before bind them. It's strange because I don't
think hotspot has chance to call their destructors. Actually, hotspot even
doesn't have chance to call their constructors because of '
NEW_RESOURCE_ARRAY'.

it's very misleading to invoke the method 'init()' with uninitialized
object. Am I right here? should I fix it?

i) I don't think scratch_emit_size is problem. I took a look at all
generated x86/arm code.
they really bind all labels except for MachBranchNodes. for MachBranchNode
nodes, they refers to fakeL which is bound as well in scratch_emit_size().

thanks,
--lx


More information about the hotspot-runtime-dev mailing list