Merged requested to merge 317791-fix-label-debug-flag-computation into master
The current code can incorrectly classify a Label as "used only for debug", which can yield incorrect stack map offsets due to skipped labels in MethodWriter.visitLabel (see bug #317791 (closed)). This happens when a label is found for the first time in a debug attribute (it is then flagged as DEBUG), and then appears again in a stack map frame (these labels are extracted after those from the debug attributes, during the bytecode parsing, but the DEBUG flag, if present, is not removed then).
The fix consists in removing the DEBUG flag, if present, when creating or reusing a label for non-debug attributes.
Closes #317791 (closed)