diff options
| author | Markus Böck <markus.boeck02@gmail.com> | 2021-12-24 21:55:07 +0100 |
|---|---|---|
| committer | Markus Böck <markus.boeck02@gmail.com> | 2022-01-05 17:58:24 +0100 |
| commit | 782791ee84d29db137f441c1e033582a7a78ad5e (patch) | |
| tree | 3956885b8c643e2058929293712889898f9875dd /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp | |
| parent | c16fd6a3762cce432319c1f0ea7aeff6666d9c26 (diff) | |
[clang][#52782] Bail on incomplete parameter type in stdcall name mangling
stdcall name mangling requires a suffix with the number equal to the sum of the byte count of all parameter types. In the case of a function prototype that has a parameter type of an incomplete type it is impossible to get the size of the type. While such a function is not callable or able to be defined in the TU, it may still be mangled when generating debug info, which would previously lead to a crash.
This patch fixes that by simply bailing out of the loop and using the so far accumulated byte count. This matches GCCs behaviour as well: https://github.com/gcc-mirror/gcc/blob/bc8d6c60137f8bbf173b86ddf31b15d7ba2a33dd/gcc/config/i386/winnt.c#L203
Fixes https://github.com/llvm/llvm-project/issues/52782
Differential Revision: https://reviews.llvm.org/D116020
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp')
0 files changed, 0 insertions, 0 deletions
