[OpenJDK 2D-Dev] RFR: 8253375: OSX build fails with Xcode 12.0 (12A7209)

Kim Barrett kim.barrett at oracle.com
Fri Sep 25 10:37:08 UTC 2020

> On Sep 25, 2020, at 6:22 AM, Lutz Schmidt <lucy at openjdk.java.net> wrote:
> On Fri, 25 Sep 2020 05:46:08 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Another note, actually, it's more like a question:
> Has anyone had an eye on what happens in initialize_shared_locs(relocInfo* buf, int length)? To my understanding,
> "buf", which is passed in as "locs_buf", is stored into CodeBuffer fields. Is that a good idea? "locs_buf" points into
> the stack. This pointer becomes invalid at the end of the "locs_buf" scope. Did I get something wrong here?

It’s “odd” but I think it’s more or less okay.  Here and in other uses we seem to be allocating
dynamically scoped storage for temporary use by the CodeBuffer.  I think a more normal
formulation might be to allocate the buffer, then pass it to the CodeBuffer constructor as a
non-transfer of ownership.  But I haven’t looked at all the places where this is used, and that’s
perhaps out of scope for the problem at hand.

> -------------
> PR: https://git.openjdk.java.net/jdk/pull/348

More information about the 2d-dev mailing list