<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libunwind, branch users/mingmingl-llvm/samplefdo-profile-format</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>[libunwind][test] set fed test to require x86 as others arch may have cross toolchain build (#156383)</title>
<updated>2025-09-02T11:30:44+00:00</updated>
<author>
<name>Wu Yingcong</name>
<email>yingcong.wu@intel.com</email>
</author>
<published>2025-09-02T11:30:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1af19772e62419809326b67994dc727e237994c2'/>
<id>1af19772e62419809326b67994dc727e237994c2</id>
<content type='text'>
In https://github.com/llvm/llvm-project/pull/154902, the test failed
with llvm-clang-win-x-aarch64(it is a cross-build, which builds on
Windows and run on Linux, "Win to Aarch64 Linux Ubuntu Cross
Toolchain"), and objdump is not available on Windows(the build env).
Set to require x86 Linux instead.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In https://github.com/llvm/llvm-project/pull/154902, the test failed
with llvm-clang-win-x-aarch64(it is a cross-build, which builds on
Windows and run on Linux, "Win to Aarch64 Linux Ubuntu Cross
Toolchain"), and objdump is not available on Windows(the build env).
Set to require x86 Linux instead.</pre>
</div>
</content>
</entry>
<entry>
<title>[libunwind] fix pc range condition check bug (#154902)</title>
<updated>2025-09-01T01:15:52+00:00</updated>
<author>
<name>Wu Yingcong</name>
<email>yingcong.wu@intel.com</email>
</author>
<published>2025-09-01T01:15:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e57f0e928d7b92f536a646d8ba1c26916b09e67e'/>
<id>e57f0e928d7b92f536a646d8ba1c26916b09e67e</id>
<content type='text'>
There is an off-by-one error with current condition check for PC fallen
into the range or not. There is another check within libunwind that use
the correct checks in
https://github.com/llvm/llvm-project/blob/5050da7ba18fc876f80fbeaaca3564d3b4483bb8/libunwind/src/UnwindCursor.hpp#L2757
```
      if ((fdeInfo.pcStart &lt;= pc) &amp;&amp; (pc &lt; fdeInfo.pcEnd))
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is an off-by-one error with current condition check for PC fallen
into the range or not. There is another check within libunwind that use
the correct checks in
https://github.com/llvm/llvm-project/blob/5050da7ba18fc876f80fbeaaca3564d3b4483bb8/libunwind/src/UnwindCursor.hpp#L2757
```
      if ((fdeInfo.pcStart &lt;= pc) &amp;&amp; (pc &lt; fdeInfo.pcEnd))
```</pre>
</div>
</content>
</entry>
<entry>
<title>[libunwind] Add support for the AArch64 "Vector Granule" (VG) register (#153565)</title>
<updated>2025-08-21T09:01:40+00:00</updated>
<author>
<name>Benjamin Maxwell</name>
<email>benjamin.maxwell@arm.com</email>
</author>
<published>2025-08-21T09:01:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bfab8085af878dbcafaf5dfac4e34dc17a20971c'/>
<id>bfab8085af878dbcafaf5dfac4e34dc17a20971c</id>
<content type='text'>
The vector granule (AArch64 DWARF register 46) is a pseudo-register that
contains the available size in bits of SVE vector registers in the
current call frame, divided by 64. The vector granule can be used in
DWARF expressions to describe SVE/SME stack frame layouts (e.g., the
location of SVE callee-saves).

The first time VG is evaluated (if not already set), it is initialized
to the result of evaluating a "CNTD" instruction (this assumes SVE is
available).

To support SME, the value of VG can change per call frame; this is
currently handled like any other callee-save and is intended to support
the unwind information implemented in #152283. This limits how VG is
used in the CFI information of functions with "streaming-mode changes"
(mode changes that change the SVE vector length), to make the unwinder's
job easier.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The vector granule (AArch64 DWARF register 46) is a pseudo-register that
contains the available size in bits of SVE vector registers in the
current call frame, divided by 64. The vector granule can be used in
DWARF expressions to describe SVE/SME stack frame layouts (e.g., the
location of SVE callee-saves).

The first time VG is evaluated (if not already set), it is initialized
to the result of evaluating a "CNTD" instruction (this assumes SVE is
available).

To support SME, the value of VG can change per call frame; this is
currently handled like any other callee-save and is intended to support
the unwind information implemented in #152283. This limits how VG is
used in the CFI information of functions with "streaming-mode changes"
(mode changes that change the SVE vector length), to make the unwinder's
job easier.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][CMake] quote ${CMAKE_SYSTEM_NAME} consistently (#154537)</title>
<updated>2025-08-20T16:45:41+00:00</updated>
<author>
<name>David Tenty</name>
<email>daltenty@ibm.com</email>
</author>
<published>2025-08-20T16:45:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=63195d3d7a8bde05590f91a38398f986bb4265b2'/>
<id>63195d3d7a8bde05590f91a38398f986bb4265b2</id>
<content type='text'>
A CMake change included in CMake 4.0 makes `AIX` into a variable
(similar to `APPLE`, etc.)
https://gitlab.kitware.com/cmake/cmake/-/commit/ff03db6657c38c8cf992877ea66174c33d0bcb0b

However, `${CMAKE_SYSTEM_NAME}` unfortunately also expands exactly to
`AIX` and `if` auto-expands variable names in CMake. That means you get
a double expansion if you write:

`if (${CMAKE_SYSTEM_NAME}  MATCHES "AIX")`
which becomes:
`if (AIX  MATCHES "AIX")`
which is as if you wrote:
`if (ON MATCHES "AIX")`

You can prevent this by quoting the expansion of "${CMAKE_SYSTEM_NAME}",
due to policy
[CMP0054](https://cmake.org/cmake/help/latest/policy/CMP0054.html#policy:CMP0054)
which is on by default in 4.0+. Most of the LLVM CMake already does
this, but this PR fixes the remaining cases where we do not.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A CMake change included in CMake 4.0 makes `AIX` into a variable
(similar to `APPLE`, etc.)
https://gitlab.kitware.com/cmake/cmake/-/commit/ff03db6657c38c8cf992877ea66174c33d0bcb0b

However, `${CMAKE_SYSTEM_NAME}` unfortunately also expands exactly to
`AIX` and `if` auto-expands variable names in CMake. That means you get
a double expansion if you write:

`if (${CMAKE_SYSTEM_NAME}  MATCHES "AIX")`
which becomes:
`if (AIX  MATCHES "AIX")`
which is as if you wrote:
`if (ON MATCHES "AIX")`

You can prevent this by quoting the expansion of "${CMAKE_SYSTEM_NAME}",
due to policy
[CMP0054](https://cmake.org/cmake/help/latest/policy/CMP0054.html#policy:CMP0054)
which is on by default in 4.0+. Most of the LLVM CMake already does
this, but this PR fixes the remaining cases where we do not.</pre>
</div>
</content>
</entry>
<entry>
<title>[libunwind] Fix return type of `DwarfFDECache::findFDE()` in definition (#146308)</title>
<updated>2025-07-22T22:03:19+00:00</updated>
<author>
<name>Alex Rønne Petersen</name>
<email>alex@alexrp.com</email>
</author>
<published>2025-07-22T22:03:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=eb0d8f9272f7c734cdaf31bc33a18e1619e021e4'/>
<id>eb0d8f9272f7c734cdaf31bc33a18e1619e021e4</id>
<content type='text'>
Needed to resolve this compilation error on some systems:

lib/libunwind/src/UnwindCursor.hpp:153:38: error: return type of
out-of-line definition of 'libunwind::DwarfFDECache::findFDE' differs
from that in the declaration
    typename A::pint_t DwarfFDECache&lt;A&gt;::findFDE(pint_t mh, pint_t pc) {
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
lib/libunwind/src/libunwind.cpp:31:10: note: in file included from
lib/libunwind/src/libunwind.cpp:31:
    #include "UnwindCursor.hpp"
             ^
lib/libunwind/src/UnwindCursor.hpp:100:17: note: previous declaration is
here
      static pint_t findFDE(pint_t mh, pint_t pc);
             ~~~~~~~^</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Needed to resolve this compilation error on some systems:

lib/libunwind/src/UnwindCursor.hpp:153:38: error: return type of
out-of-line definition of 'libunwind::DwarfFDECache::findFDE' differs
from that in the declaration
    typename A::pint_t DwarfFDECache&lt;A&gt;::findFDE(pint_t mh, pint_t pc) {
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
lib/libunwind/src/libunwind.cpp:31:10: note: in file included from
lib/libunwind/src/libunwind.cpp:31:
    #include "UnwindCursor.hpp"
             ^
lib/libunwind/src/UnwindCursor.hpp:100:17: note: previous declaration is
here
      static pint_t findFDE(pint_t mh, pint_t pc);
             ~~~~~~~^</pre>
</div>
</content>
</entry>
<entry>
<title>[libcxxabi][libunwind] Support for using LLVM libc (#134893)</title>
<updated>2025-07-09T07:48:50+00:00</updated>
<author>
<name>Petr Hosek</name>
<email>phosek@google.com</email>
</author>
<published>2025-07-09T07:48:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9d3b60dea7ad81f6cb0d9f2e51bb6c80c03fa2d4'/>
<id>9d3b60dea7ad81f6cb0d9f2e51bb6c80c03fa2d4</id>
<content type='text'>
This generalizes the support added in #99287 renaming the option to
RUNTIMES_USE_LIBC and integrating the module into libc++abi and
libunwind as well.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This generalizes the support added in #99287 renaming the option to
RUNTIMES_USE_LIBC and integrating the module into libc++abi and
libunwind as well.</pre>
</div>
</content>
</entry>
<entry>
<title>libunwind: Do not use  __attribute__((target("gcs"))) with non-clang compilers (#138077)</title>
<updated>2025-06-12T03:22:08+00:00</updated>
<author>
<name>Khem Raj</name>
<email>raj.khem@gmail.com</email>
</author>
<published>2025-06-12T03:22:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b46f34452e9dec50eee6ddbe07875f05e421a81c'/>
<id>b46f34452e9dec50eee6ddbe07875f05e421a81c</id>
<content type='text'>
This attribute is unsupported in GCC, so far it worked because before
GCC15 did not define this macros in _CHKFEAT_GCS in arm_acle.h [1]

With gcc15 compiler libunwind's check for this macros is succeeding and
it ends up enabling 'gcs' by using function attribute, this works with
clang but not with gcc.

We can see this in rust compiler bootstrap for aarch64/musl when system
uses gcc15, it ends up with these errors

Building libunwind.a for aarch64-poky-linux-musl
```
cargo:warning=/mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux-musl/rust/1.85.1/rustc-1.85.1-src/src/llvm-project/libunwind/src/UnwindLevel1.c:191:1: error: arch extension 'gcs' should be prefixed by '+' cargo:warning=  191 | unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) {
cargo:warning=      | ^~~~~~~~~~~~~
cargo:warning=/mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux-musl/rust/1.85.1/rustc-1.85.1-src/src/llvm-project/libunwind/src/UnwindLevel1.c:337:22: error: arch extension 'gcs' should be prefixed by '+'
cargo:warning=  337 |                      _Unwind_Stop_Fn stop, void *stop_parameter) {
cargo:warning=      |                      ^~~~~~~~~~~~~~~
```

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5a6af707f0af

Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This attribute is unsupported in GCC, so far it worked because before
GCC15 did not define this macros in _CHKFEAT_GCS in arm_acle.h [1]

With gcc15 compiler libunwind's check for this macros is succeeding and
it ends up enabling 'gcs' by using function attribute, this works with
clang but not with gcc.

We can see this in rust compiler bootstrap for aarch64/musl when system
uses gcc15, it ends up with these errors

Building libunwind.a for aarch64-poky-linux-musl
```
cargo:warning=/mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux-musl/rust/1.85.1/rustc-1.85.1-src/src/llvm-project/libunwind/src/UnwindLevel1.c:191:1: error: arch extension 'gcs' should be prefixed by '+' cargo:warning=  191 | unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) {
cargo:warning=      | ^~~~~~~~~~~~~
cargo:warning=/mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux-musl/rust/1.85.1/rustc-1.85.1-src/src/llvm-project/libunwind/src/UnwindLevel1.c:337:22: error: arch extension 'gcs' should be prefixed by '+'
cargo:warning=  337 |                      _Unwind_Stop_Fn stop, void *stop_parameter) {
cargo:warning=      |                      ^~~~~~~~~~~~~~~
```

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5a6af707f0af

Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[libunwind] Remove checks for -nostdlib++ (#143162)</title>
<updated>2025-06-11T09:43:34+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2025-06-11T09:43:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c59cc2b690b9e528a82ba214f74a8f7c8abb3cde'/>
<id>c59cc2b690b9e528a82ba214f74a8f7c8abb3cde</id>
<content type='text'>
libunwind uses a C linker, so it's never even trying to link against any
C++ libraries. This removes the code which tries to drop C++ libraries,
which makes the CMake configuration simpler and allows for upgrading
GCC.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libunwind uses a C linker, so it's never even trying to link against any
C++ libraries. This removes the code which tries to drop C++ libraries,
which makes the CMake configuration simpler and allows for upgrading
GCC.</pre>
</div>
</content>
</entry>
<entry>
<title>[libunwind][Haiku] Fix signal frame unwinding (#135367)</title>
<updated>2025-05-29T02:18:55+00:00</updated>
<author>
<name>Trung Nguyen</name>
<email>57174311+trungnt2910@users.noreply.github.com</email>
</author>
<published>2025-05-29T02:18:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1d9ef8211f399a57849d0bc47cb86bf594bac364'/>
<id>1d9ef8211f399a57849d0bc47cb86bf594bac364</id>
<content type='text'>
The current unwinding implementation on Haiku is messy and broken.
1. It searches weird paths for private headers, which is breaking builds
in consuming projects, such as dotnet/runtime.
2. It does not even work, due to relying on incorrect private offsets.

This commit strips all references to private headers and ports a working
signal frame implementation. It has been tested against
`tests/signal_unwind.pass.cpp` and can go pass the signal frame.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current unwinding implementation on Haiku is messy and broken.
1. It searches weird paths for private headers, which is breaking builds
in consuming projects, such as dotnet/runtime.
2. It does not even work, due to relying on incorrect private offsets.

This commit strips all references to private headers and ports a working
signal frame implementation. It has been tested against
`tests/signal_unwind.pass.cpp` and can go pass the signal frame.</pre>
</div>
</content>
</entry>
<entry>
<title>[libunwind] Add initial ARM64EC support (#138583)</title>
<updated>2025-05-13T13:12:16+00:00</updated>
<author>
<name>Jacek Caban</name>
<email>jacek@codeweavers.com</email>
</author>
<published>2025-05-13T13:12:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=84c1564d1825880d463d9f85153812f1f6805289'/>
<id>84c1564d1825880d463d9f85153812f1f6805289</id>
<content type='text'>
ARM64EC defines `__x86_64__`, which is sufficient to make most C/C++
code behave correctly. To preserve an external ABI compatible with
x86_64, this patch uses the x86_64 context layout and implements
`unw_getcontext` by storing the appropriate aarch64 registers according
to the mapping defined by the ARM64EC ABI.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ARM64EC defines `__x86_64__`, which is sufficient to make most C/C++
code behave correctly. To preserve an external ABI compatible with
x86_64, this patch uses the x86_64 context layout and implements
`unw_getcontext` by storing the appropriate aarch64 registers according
to the mapping defined by the ARM64EC ABI.</pre>
</div>
</content>
</entry>
</feed>
