RFR: 8304919: Implementation of Virtual Threads [v6]

Alan Bateman alanb at openjdk.org
Fri Apr 7 06:49:54 UTC 2023


On Fri, 7 Apr 2023 06:41:26 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> The lambda here uses `System.out` to format and print and there's a loop which converts each collect `StackFrame` to a printable `StackTraceElement`. I had a brief look at the internals of the classes involved, but couldn't spot any code that instantiates or calls `set()` on any `ThreadLocal`s. Is there any specific code here which would trigger recursive thread-local usage or is it more a precaution to prevent any such potential usage.

Formatting is locale specific and amounts to running arbitrary code, so this cod has to defend against recursive calls.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13203#discussion_r1160478956


More information about the serviceability-dev mailing list