Duplicate :
|
Sometimes C2 eliminates non-null branch in the following code as if it proved that ThreadCont.getAndSet() can't return non-null: val cont = ThreadCont.getAndSet(threads[i], null) if (cont != null) { /* do something */ } Detailed problem description & reproducer (by Roman Elizarov): https://github.com/ktorio/ktor/blob/resumeAnyThread_HotSpotBug/BUG_README_FIRST.md
|