RFR(S) 8077504: Unsafe load can loose control dependency and cause crash
Andrew Dinn
adinn at redhat.com
Mon May 18 19:40:22 UTC 2015
On 18/05/15 12:53, Roland Westrelin wrote:
> My change is broken.
> GraphKit::make_load() takes 2 boolean arguments: bool depends_only_on_test = true, bool require_atomic_access = false)
> and Parse::do_get_xxx() passes the value needs_atomic_access as argument depends_only_on_test instead of require_atomic_access. That goes unnoticed because of the default values. It’s the exact reason I didn’t use default arguments in my first webrev. It’s too easy to make a mistake and not notice it.
> If we keep default arguments, one way to have help from the compiler would be to use a 2 value enum:
>
> enum DependsOnlyOnTest {
> DoesDependOnlyOnTest,
> DoesNotDependOnlyOnTest
> };
>
> and use it to pass parameters around. The _depends_only_on_test LoadNode field would still be a boolean. Is this acceptable?
That looks perfectly acceptable to me (not a reviewer but I was the one
who set you off down this path).
regards,
Andrew Dinn
-----------
More information about the hotspot-compiler-dev
mailing list