<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[lldb] Fix a use-after-free in SymbolFileCTF (#151586)</title>
<updated>2025-07-31T21:15:20+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-07-31T21:15:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e1d45b1b97c1f18e5a5fb9db8621ae4b34ba0ab1'/>
<id>e1d45b1b97c1f18e5a5fb9db8621ae4b34ba0ab1</id>
<content type='text'>
This fixes a use-after-free in SymbolFileCTF. Previously, we would
remove the underlying CTF type as soon as we resolved it. However, it's
possible that we're still holding onto the CTF type while we're parsing
a dependent type, like a modifier, resulting in a use-after-free. This
patch addresses the issue by delaying the removal of the CTF type until
the type is fully resolved.

I have a XNU kernel binary that reproduces the issue and confirmed that
this solves the memory issue using ASan. However I haven't been able to
craft types by hand that reproduce this issue for a test case.

rdar://156660866</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a use-after-free in SymbolFileCTF. Previously, we would
remove the underlying CTF type as soon as we resolved it. However, it's
possible that we're still holding onto the CTF type while we're parsing
a dependent type, like a modifier, resulting in a use-after-free. This
patch addresses the issue by delaying the removal of the CTF type until
the type is fully resolved.

I have a XNU kernel binary that reproduces the issue and confirmed that
this solves the memory issue using ASan. However I haven't been able to
craft types by hand that reproduce this issue for a test case.

rdar://156660866</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Eliminate namespace lldb_private::dwarf (NFC) (#150073)</title>
<updated>2025-07-22T22:51:00+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-07-22T22:51:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2cb1ecb94bb4e7f89494e59d25707fd9787ff98a'/>
<id>2cb1ecb94bb4e7f89494e59d25707fd9787ff98a</id>
<content type='text'>
Eliminate the `lldb_private::dwarf` namespace, in favor of using
`llvm::dwarf` directly. The latter is shorter, and this avoids ambiguity
in the ABI plugins that define a `dwarf` namespace inside an anonymous
namespace.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Eliminate the `lldb_private::dwarf` namespace, in favor of using
`llvm::dwarf` directly. The latter is shorter, and this avoids ambiguity
in the ABI plugins that define a `dwarf` namespace inside an anonymous
namespace.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][TypeSystem][NFC] CreateFunctionType to take parameters by llvm::ArrayRef (#142620)</title>
<updated>2025-06-03T22:37:39+00:00</updated>
<author>
<name>Michael Buch</name>
<email>michaelbuch12@gmail.com</email>
</author>
<published>2025-06-03T22:37:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cb56e15bb3e92c8aab2b7fd74a7683ffd83ac10b'/>
<id>cb56e15bb3e92c8aab2b7fd74a7683ffd83ac10b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Upgrade CompilerType::GetBitSize to return llvm::Expected  (#129601)</title>
<updated>2025-03-05T18:21:19+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2025-03-05T18:21:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=878a64f94a264ea4b564d6063614ddb0b5da3f6c'/>
<id>878a64f94a264ea4b564d6063614ddb0b5da3f6c</id>
<content type='text'>
This patch pushes the error handling boundary for the GetBitSize()
methods from Runtime into the Type and CompilerType APIs. This makes it
easier to diagnose problems thanks to more meaningful error messages
being available. GetBitSize() is often the first thing LLDB asks about a
type, so this method is particularly important for a better user
experience.

rdar://145667239</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch pushes the error handling boundary for the GetBitSize()
methods from Runtime into the Type and CompilerType APIs. This makes it
easier to diagnose problems thanks to more meaningful error messages
being available. GetBitSize() is often the first thing LLDB asks about a
type, so this method is particularly important for a better user
experience.

rdar://145667239</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Avoid Function::GetAddressRange in SymbolFileCTF (#128517)</title>
<updated>2025-02-25T07:57:55+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2025-02-25T07:57:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f5d80c335d79d0b35741bfc762f8157a24f5491a'/>
<id>f5d80c335d79d0b35741bfc762f8157a24f5491a</id>
<content type='text'>
SymbolFileCTF never creates discontinuous functions, so this is
technically NFC, but it takes us one step closer to removing the
deprecated API.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SymbolFileCTF never creates discontinuous functions, so this is
technically NFC, but it takes us one step closer to removing the
deprecated API.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Use the first address range as the function address (#122440)</title>
<updated>2025-01-24T11:50:06+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2025-01-24T11:50:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=57b48987f6c21e369e7bb1626dc79ca74aa34fdb'/>
<id>57b48987f6c21e369e7bb1626dc79ca74aa34fdb</id>
<content type='text'>
This is the behavior expected by DWARF. It also requires some fixups to
algorithms which were storing the addresses of some objects (Blocks and
Variables) relative to the beginning of the function.

There are plenty of things that still don't work in this setups, but
this change is sufficient for the expression evaluator to correctly
recognize the entry point of a function in this case.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the behavior expected by DWARF. It also requires some fixups to
algorithms which were storing the addresses of some objects (Blocks and
Variables) relative to the beginning of the function.

There are plenty of things that still don't work in this setups, but
this change is sufficient for the expression evaluator to correctly
recognize the entry point of a function in this case.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] (Begin to) support discontinuous lldb_private::Functions (#115730)</title>
<updated>2024-11-12T08:34:53+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2024-11-12T08:34:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2a3c08f620fc89823ebf1d2af4ea0beb97671db2'/>
<id>2a3c08f620fc89823ebf1d2af4ea0beb97671db2</id>
<content type='text'>
This is the beginning of a different, more fundamental approach to
handling. This PR tries to tries to minimize functional changes. It only
makes sure that we store the true set of ranges inside the function
object, so that subsequent patches can make use of it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the beginning of a different, more fundamental approach to
handling. This PR tries to tries to minimize functional changes. It only
makes sure that we store the true set of ranges inside the function
object, so that subsequent patches can make use of it.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] Add explicit #include llvm-config.h where its macros are used, lldb part. (#107603)</title>
<updated>2024-09-09T10:44:03+00:00</updated>
<author>
<name>Daniil Fukalov</name>
<email>dfukalov@gmail.com</email>
</author>
<published>2024-09-09T10:44:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=345cc47ba7a28811ae4ec7d113059ccb39c500a3'/>
<id>345cc47ba7a28811ae4ec7d113059ccb39c500a3</id>
<content type='text'>
(this is lldb part)

Without these explicit includes, removing other headers, who implicitly
include llvm-config.h, may have non-trivial side effects. For example,
`clangd` may report even `llvm-config.h` as "no used" in case it defines
a macro, that is explicitly used with #ifdef. It is actually amplified
with different build configs which use different set of macros.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(this is lldb part)

Without these explicit includes, removing other headers, who implicitly
include llvm-config.h, may have non-trivial side effects. For example,
`clangd` may report even `llvm-config.h` as "no used" in case it defines
a macro, that is explicitly used with #ifdef. It is actually amplified
with different build configs which use different set of macros.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix crash in SymbolFileCTF::ParseFunctions (#89845)</title>
<updated>2024-04-23T23:50:22+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-04-23T23:50:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fd4399cb11f4069888bc7eac01f74493b5a2af48'/>
<id>fd4399cb11f4069888bc7eac01f74493b5a2af48</id>
<content type='text'>
Make SymbolFileCTF::ParseFunctions resilient against not being able to
resolve the argument or return type of a function. ResolveTypeUID can
fail for a variety of reasons so we should always check its result.

The type that caused the crash was `_Bool` which we didn't recognize 
as a basic type. This commit also fixes the underlying issue and adds
a test.

rdar://126943722</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make SymbolFileCTF::ParseFunctions resilient against not being able to
resolve the argument or return type of a function. ResolveTypeUID can
fail for a variety of reasons so we should always check its result.

The type that caused the crash was `_Bool` which we didn't recognize 
as a basic type. This commit also fixes the underlying issue and adds
a test.

rdar://126943722</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Silence warning with latest MSVC on Windows</title>
<updated>2024-01-18T18:06:12+00:00</updated>
<author>
<name>Alexandre Ganea</name>
<email>alex_toresh@yahoo.fr</email>
</author>
<published>2024-01-18T14:33:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bafdaa171a2806ceff628ed7b64ace2b92c05578'/>
<id>bafdaa171a2806ceff628ed7b64ace2b92c05578</id>
<content type='text'>
Fixes:
```
[3465/3822] Building CXX object tools\lldb\source\Plugins\SymbolFile\CTF\CMakeFiles\lldbPluginSymbolFileCTF.dir\SymbolFileCTF.cpp.obj
C:\git\llvm-project\lldb\source\Plugins\SymbolFile\CTF\SymbolFileCTF.cpp(606) : warning C4715: 'lldb_private::SymbolFileCTF::CreateType': not all control paths return a value
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes:
```
[3465/3822] Building CXX object tools\lldb\source\Plugins\SymbolFile\CTF\CMakeFiles\lldbPluginSymbolFileCTF.dir\SymbolFileCTF.cpp.obj
C:\git\llvm-project\lldb\source\Plugins\SymbolFile\CTF\SymbolFileCTF.cpp(606) : warning C4715: 'lldb_private::SymbolFileCTF::CreateType': not all control paths return a value
```
</pre>
</div>
</content>
</entry>
</feed>
