Back in 2018, JDK-8209588, and shortly after, JDK-8209950 was filed. The remedy to the observed SIGSEGV was to call a method which would use heuristics, guided by prior observations, to find out if the storage at hand was safe to be interpreted a nmethod object.
Meanwhile, further insights led to the conclusion that the Compile_lock should be held (in addition to the CodeCache_lock) while constructing the MethodArityHistogram. Holding that additional lock would make it obsolete to rely on heuristics.