On Wed, 17 Mar 2021 06:35:34 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:

>> SonarCloud reports the following problem in MethodComparator::methods_EMCP:
>>  "Address of stack memory associated with local variable 's_new' is still 
>> referred to by the global variable '_s_new' upon returning to the caller. 
>> This will be a dangling reference"
>> 
>> Code inspection reveals the assignment to static variables is only needed to 
>> pass them to helper methods. So, while this is not a detectable bug (yet), 
>> it is still cleaner not to expose stack variables in globals.
>> 
>> Additional testing:
>>  - [x] Linux x86_64 fastdebug `tier1`
>>  - [x] Linux x86_64 fastdebug, `vmTestbase_nsk_jvmti`
>
> Aleksey Shipilev has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains five additional 
> commits since the last revision:
> 
>  - Update copyrights
>  - Drop excess parentheses
>  - Merge branch 'master' into JDK-8263434-dangling-methodcomparator-ecmp
>  - Sprinkling consts
>  - 8263434: Dangling references after MethodComparator::methods_EMCP

Marked as reviewed by sspitsyn (Reviewer).

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

PR: https://git.openjdk.java.net/jdk/pull/2937

Reply via email to