You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hipBinUtilPtr_ field is never initialized in hipBin_amd.h or hipBin_nvidia.h so all member calls through it are UB. Looks like it's accidentally redefined as a private field instead of reusing the inherited protected field which is initialized correctly.
Detected by UBSAN if hipcc is built with -fsanitize=undefined
Line numbers on rocm-6.2.2 tag:
rocsparse> /build/source/amd/hipcc/src/hipBin_amd.h:507:38: runtime error: member call on null pointer of type 'HipBinUtil'
rocsparse> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /build/source/amd/hipcc/src/hipBin_amd.h:507:38
rocsparse> /build/source/amd/hipcc/src/hipBin_amd.h:543:27: runtime error: member call on null pointer of type 'HipBinUtil'
rocsparse> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /build/source/amd/hipcc/src/hipBin_amd.h:543:27
rocsparse> /build/source/amd/hipcc/src/hipBin_amd.h:558:25: runtime error: member call on null pointer of type 'HipBinUtil'
rocsparse> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /build/source/amd/hipcc/src/hipBin_amd.h:558:25
rocsparse> /build/source/amd/hipcc/src/hipBin_amd.h:589:25: runtime error: member call on null pointer of type 'HipBinUtil'
rocsparse> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /build/source/amd/hipcc/src/hipBin_amd.h:589:25
rocsparse> /build/source/amd/hipcc/src/hipBin_amd.h:592:25: runtime error: member call on null pointer of type 'HipBinUtil'
rocsparse> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /build/source/amd/hipcc/src/hipBin_amd.h:592:25
rocsparse> /build/source/amd/hipcc/src/hipBin_amd.h:619:32: runtime error: member call on null pointer of type 'HipBinUtil'
rocsparse> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /build/source/amd/hipcc/src/hipBin_amd.h:619:32
rocsparse> /build/source/amd/hipcc/src/hipBin_amd.h:622:32: runtime error: member call on null pointer of type 'HipBinUtil'
rocsparse> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /build/source/amd/hipcc/src/hipBin_amd.h:622:32
rocsparse> /build/source/amd/hipcc/src/hipBin_amd.h:629:29: runtime error: member call on null pointer of type 'HipBinUtil'
rocsparse> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /build/source/amd/hipcc/src/hipBin_amd.h:629:29
rocsparse> /build/source/amd/hipcc/src/hipBin_amd.h:765:44: runtime error: member call on null pointer of type 'HipBinUtil'
rocsparse> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /build/source/amd/hipcc/src/hipBin_amd.h:765:44
rocsparse> /build/source/amd/hipcc/src/hipBin_amd.h:771:56: runtime error: member call on null pointer of type 'HipBinUtil'
rocsparse> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /build/source/amd/hipcc/src/hipBin_amd.h:771:56
rocsparse> /build/source/amd/hipcc/src/hipBin_amd.h:904:30: runtime error: member call on null pointer of type 'HipBinUtil'
rocsparse> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /build/source/amd/hipcc/src/hipBin_amd.h:904:30
Operating System
NixOS
CPU
Epyc 7642
GPU
AMD Instinct MI100
ROCm Version
ROCm 6.2.0
ROCm Component
HIPCC
Steps to Reproduce
No response
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Problem Description
The
hipBinUtilPtr_
field is never initialized inhipBin_amd.h
orhipBin_nvidia.h
so all member calls through it are UB. Looks like it's accidentally redefined as a private field instead of reusing the inherited protected field which is initialized correctly.Detected by UBSAN if hipcc is built with
-fsanitize=undefined
Line numbers on rocm-6.2.2 tag:
Operating System
NixOS
CPU
Epyc 7642
GPU
AMD Instinct MI100
ROCm Version
ROCm 6.2.0
ROCm Component
HIPCC
Steps to Reproduce
No response
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: