From ad3d2b0679728873bacf48d35964b1024690318a Mon Sep 17 00:00:00 2001 From: sonadeem Date: Tue, 17 Dec 2024 18:13:20 -0500 Subject: [PATCH] SWDEV-503436 - Fix incorrect OptionGroup for FSanitize option NOPTION is meant for component options or alias runtime options so the option group must not be OA_RUNTIME or OA_MISC_ALIAS must be set, otherwise we incorrectly assume that it has an option variable and attempting to write to it causes corruption of OptionVariables. Change-Id: Iafb5a8f743e5ed0f87be36061c44578178f6cfde [ROCm/clr commit: caa10572cb79026fee8ffd9a882d97748540ae9a] --- projects/clr/rocclr/compiler/lib/utils/OPTIONS.def | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/clr/rocclr/compiler/lib/utils/OPTIONS.def b/projects/clr/rocclr/compiler/lib/utils/OPTIONS.def index 85724813b6..fce695da3d 100644 --- a/projects/clr/rocclr/compiler/lib/utils/OPTIONS.def +++ b/projects/clr/rocclr/compiler/lib/utils/OPTIONS.def @@ -56,6 +56,10 @@ * OPTION(type, attr, sn, ln, var, ideft, imix, imax, sdeft, desc) * NOPTION(type, attr, sn, ln, var, ideft, imix, imax, sdeft, desc) * + * Note: As mentioned above, NOPTION is for component options or alias runtime options so + * when using it make sure that either the option group is not OA_RUNTIME or that you + * have OA_MISC_ALIAS set. + * * For convenience, FLAG marco is provided as well. FLAG macro is very close to a flag * used in flags.hpp. It is define as below: * FLAG(type, vis, sn, var, deft, desc) @@ -1277,7 +1281,7 @@ OPTION(OT_UINT32, \ // -fsanitze=tool NOPTION(OT_CSTRING, \ - OA_RUNTIME|OVA_REQUIRED|OA_SEPARATOR_EQUAL|OFA_PREFIX_F, \ + OA_CLC|OVA_REQUIRED|OA_SEPARATOR_EQUAL|OFA_PREFIX_F, \ "sanitize", NULL, \ FSanitize, \ 0, 0, 0, "address", \