summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
diff options
context:
space:
mode:
authorjeanPerier <jperier@nvidia.com>2024-02-16 08:51:03 +0100
committerGitHub <noreply@github.com>2024-02-16 08:51:03 +0100
commitd26a6464f85fc224dc2f3ddb67d404ba82a331fa (patch)
treed28450f38d5f659d0f0732be441c220e5327f507 /lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
parent42b5037cc403c09ebf9b4d65ee41422ded79e054 (diff)
[flang] Do not leave length parameters uninitialized in descriptor addendums (#81858)
Descriptor addendum have a field to hold length parameters (currently only one). This field is currently never used because flang does not lowered derived types with length parameters. However, leaving it uninitialized is causing bugs in code like gFTL where the code is trying to sort POINTERs (see [1]). More precisely, it is an issue when two pointers should compare equal (same base address), because the uninitialized values in the addendum may differ depending on the "stack history" and optimization level. Always initialized the length parameters field in the addendum to zero. [1]: https://github.com/Goddard-Fortran-Ecosystem/gFTL/blob/dc93a5fc2fe2b487590580d9f0a17d77ca3fe5c1/include/v1/templates/set_impl.inc#L312 The type being transferred to an integer array may look like: ``` TYPE :: localwrapper TYPE(T), POINTER :: item END TYPE localwrapper ``` Which in flang case ends-up transferring a descriptor to an integer array, the code in gFTL later compare the integer arrays. This logic is used when building set data structures in gFTL.
Diffstat (limited to 'lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py')
0 files changed, 0 insertions, 0 deletions