Skip to content

Commit

Permalink
Fix intermittant UBSAN error
Browse files Browse the repository at this point in the history
Summary:
Uninitialized value (even though not used in this path) was causing intermittent undefined behavior.

UndefinedBehaviorSanitizer: invalid-shift-exponent deeplearning/fbgemm/src/EmbeddingSpMDMAvx512.cc:124:42

Reviewed By: jiyuanzFB

Differential Revision: D31515040

fbshipit-source-id: ec17fe727da8704a6cdef1bd62ce3c0e70ec5530
  • Loading branch information
dskhudia authored and facebook-github-bot committed Oct 12, 2021
1 parent fc7af8f commit 9698cad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EmbeddingSpMDMAvx512.cc
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ void compressed_indices_remap_avx512(
constexpr int UNROLL_REM = 1;
for (; k < offsets_len; ++k) {
int32_t len[UNROLL_REM];
int32_t rem[UNROLL_REM];
int32_t rem[UNROLL_REM] = {0};
for (int l = 0; l < UNROLL_REM; ++l) {
len[l] = offsets[k + l] - offsets[k + l - 1];
}
Expand Down

0 comments on commit 9698cad

Please sign in to comment.