Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JaCoCo instrumented constructor skipped. #8057

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 19, 2023

  1. Fix JaCoCo instrumented constructor skipped.

    Detect JaCoCo instrumentation from the original constructor by checking if the beginning one or two instructions are from JaCoCo. Simply by instructions' type and content.
    
    An then strip JaCoCo constructor probes data initialization instructions from `callSuper` instructions for JaCoCo instrumentation was detected. And insert these instructions into the beginning of the original construction.
    
    Overall, we assume that the JaCoCo instrumentation detecting and JaCoCo initialization instructions are in general cases and obey the JaCoCo implementations.
    
    Note that there can be many instructions before the call super() or this(), so this can still break the instruction compatibility?
    
    Tested by: JaCoCo offline integration tests.
    
    Signed-off-by: ZSmallX <diosmallx@gmail.com>
    ZSmallX committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    943b71e View commit details
    Browse the repository at this point in the history