While using a debug build with -fno-elide-constructors turned on, which turns off C++ Return Value Optimization, I get a crash because the JvmtiAgentList::Iterator destructor frees the same _stack object twice. This happens because code like
Iterator it = xrun_agents();
creates a temprary object. My understanding is that Return Value Optimization is not guaranteed with C++14, so we should not be relying on it for code correctness.
Iterator it = xrun_agents();
creates a temprary object. My understanding is that Return Value Optimization is not guaranteed with C++14, so we should not be relying on it for code correctness.
- relates to
-
JDK-8259036 Failed JfrVersionSystem invariant when VM built with -fno-elide-constructors
-
- Resolved
-