mirror of
https://github.com/amd/blis.git
synced 2026-05-11 17:50:00 +00:00
Fixed ASAN reported issues in bli_l3_packm.c
The local_mem_s is allocated on stack but in the inner scop of the “if” block, however, it can be accessed through cntl_mem_p outside the if block. This error is flagged by address sanitizer. Fixed this issue by moving the variables declaration at the functions scope. This fix address the issue reported for follwoing libflame APIs geqp3, geqrf, gerq2, gerqf, gesvd, ggev, ggevx, potrf, potrs, stedc, steqr, syevd AMD-Internal: [CPUPL-2587] Change-Id: Ib1e9f89bc4b6911e4b7e9b910d1ecc2ba00b286a
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas at Austin
|
||||
Copyright (C) 2018 - 2019, Advanced Micro Devices, Inc.
|
||||
Copyright (C) 2018 - 2022, Advanced Micro Devices, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
@@ -75,14 +75,14 @@ void bli_l3_packm
|
||||
// Query the address of the mem_t entry within the control tree node.
|
||||
cntl_mem_p = bli_cntl_pack_mem( cntl );
|
||||
|
||||
mem_t* local_mem_p;
|
||||
mem_t local_mem_s;
|
||||
|
||||
// Check the mem_t field in the control tree. If it is unallocated, then
|
||||
// we need to acquire a block from the memory broker and broadcast it to
|
||||
// all threads in the chief's thread group.
|
||||
if ( bli_mem_is_unalloc( cntl_mem_p ) )
|
||||
{
|
||||
mem_t* local_mem_p;
|
||||
mem_t local_mem_s;
|
||||
|
||||
if ( bli_thread_am_ochief( thread ) )
|
||||
{
|
||||
#ifdef BLIS_ENABLE_MEM_TRACING
|
||||
@@ -110,9 +110,6 @@ void bli_l3_packm
|
||||
}
|
||||
else // ( bli_mem_is_alloc( cntl_mem_p ) )
|
||||
{
|
||||
mem_t* local_mem_p;
|
||||
mem_t local_mem_s;
|
||||
|
||||
// If the mem_t entry in the control tree does NOT contain a NULL
|
||||
// buffer, then a block has already been acquired from the memory
|
||||
// broker and cached in the control tree.
|
||||
@@ -163,7 +160,6 @@ void bli_l3_packm
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Update the buffer address in x_pack to point to the buffer associated
|
||||
// with the mem_t entry acquired from the memory broker (now cached in
|
||||
// the control tree node).
|
||||
|
||||
Reference in New Issue
Block a user