JDK-8160357: assert(_in == (Node**)this) failed: Must not pass arg count to 'new'

Kim Barrett kim.barrett at oracle.com
Mon Jun 27 19:20:26 UTC 2016


> On Jun 27, 2016, at 2:58 PM, Kim Barrett <kim.barrett at oracle.com> wrote:
>  inline void* operator new(size_t x) throw() {
>    Compile* C = Compile::current();
>    Node* n = (Node*)C->node_arena()->Amalloc_D(x);
> #ifdef ASSERT
>    n->_in = (Node**)n; // magic cookie for assertion check
> #endif
>    return (void*)n;
>  }
> 
> That assignment of n->_in is, in this context, undefined behavior.
> This was reported by Andrew Hughes back in March 2016.
> http://mail.openjdk.java.net/pipermail/build-dev/2016-March/016767.html

I thought there was a bug report for this undefined behavior, but I haven’t been able to find it.



More information about the hotspot-dev mailing list