aboutsummaryrefslogtreecommitdiff
path: root/kapi
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-09-05 11:18:38 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-09-05 11:21:18 +0200
commit3eb72bb6bc7446df3e34bd990cb84a0b8178b9cd (patch)
tree21a8c11f4d140c5babe921efa2b9acfb125df1b3 /kapi
parent3697f01a3906815cbbbe8927f50045163976c1db (diff)
downloadkernel-3eb72bb6bc7446df3e34bd990cb84a0b8178b9cd.tar.xz
kernel-3eb72bb6bc7446df3e34bd990cb84a0b8178b9cd.zip
x86_64/cpu: improve stack overflow detection
Diffstat (limited to 'kapi')
-rw-r--r--kapi/kapi/memory/address.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kapi/kapi/memory/address.hpp b/kapi/kapi/memory/address.hpp
index a7f5ac92..5b84a381 100644
--- a/kapi/kapi/memory/address.hpp
+++ b/kapi/kapi/memory/address.hpp
@@ -102,7 +102,7 @@ namespace kapi::memory
//!
//! @param n The amount to subtract from this address
//! @return A nre address, @p n ahead of this one
- [[nodiscard]] constexpr auto operator-(std::ptrdiff_t n) noexcept -> address
+ [[nodiscard]] constexpr auto operator-(std::ptrdiff_t n) const noexcept -> address
{
return address{m_value - n};
}
@@ -139,7 +139,7 @@ namespace kapi::memory
//!
//! @param other The address to calculate the distance to.
//! @return The distance between this address and the given one.
- [[nodiscard]] constexpr auto operator-(address const & other) noexcept -> std::ptrdiff_t
+ [[nodiscard]] constexpr auto operator-(address const & other) const noexcept -> std::ptrdiff_t
{
return m_value - other.m_value;
}