From aba150e79b867f86f703f3fc774f4f4dab10cde6 Mon Sep 17 00:00:00 2001 From: Sayuri <40526330+Umgak@users.noreply.github.com> Date: Wed, 28 Oct 2026 02:45:24 -0500 Subject: [PATCH 1/2] Reduce buffer sizes SKSE has a hardcoded limit on both codegen and trampoline buffers. Take as little as possible. --- CHANGELOG.md | 8 +++++++- include/RLA_Version.hpp | 2 +- src/RememberLockpickAngle.cpp | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6838e13..56bd688 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog -## [v5.0.3] = 2026-10-17 +## [v5.0.4] - 2026-10-28 +- Reduced codegen buffer allocation size. +- Reduced trampoline buffer allocation size. + - Users have finally discovered the 64kb SKSE hook trampoline limit due to the number of AI generated SKSE plugins. + - I don't remember why it was 1kb before. It's a single jmp instruction. + +## [v5.0.3] - 2026-10-17 - Fixed a bug in which lookupFormByID would fail in all cases, breaking perk requirements. - Fixed a bug which incorrectly encoded the version as 5.0 in SKSE's version data. The full version number will now be reported correctly to SKSE - the log file was not affected. diff --git a/include/RLA_Version.hpp b/include/RLA_Version.hpp index 80daae4..420ae30 100644 --- a/include/RLA_Version.hpp +++ b/include/RLA_Version.hpp @@ -12,7 +12,7 @@ #define RLA_VERSION_MAJOR 5 #define RLA_VERSION_MINOR 0 -#define RLA_VERSION_PATCH 3 +#define RLA_VERSION_PATCH 4 #define RLA_VERSION_HOTFIX 0 #define RLA_VERSION_VERSTRING MAKE_STR(RLA_VERSION_MAJOR) "." MAKE_STR(RLA_VERSION_MINOR) "." MAKE_STR(RLA_VERSION_PATCH) diff --git a/src/RememberLockpickAngle.cpp b/src/RememberLockpickAngle.cpp index e35a408..af27366 100644 --- a/src/RememberLockpickAngle.cpp +++ b/src/RememberLockpickAngle.cpp @@ -36,7 +36,7 @@ namespace RememberLockpickAngle { Xbyak::Label rememberPickAngle; Xbyak::Label returnLabel; mov(r14, reinterpret_cast(_hasRequiredPerk)); // it is with a heavy heart that I inform you that this only causes issues on Windows. - call(r14); // on Linux you can litrally just call(_hasRequiredPerk) and it's fine. + call(r14); // on Linux you can literally just call(_hasRequiredPerk) and it's fine. xor_(r14, r14); // and I didn't think that the Windows memory allocator was THAT radically different I guess. test(al, al); jnz(rememberPickAngle); @@ -47,11 +47,11 @@ namespace RememberLockpickAngle { dq(entrypoint + 0x7); } }; - if (!g_branchTrampoline.Create(1024)) { + if (!g_branchTrampoline.Create(14)) { _FATALERROR("[FATAL ERROR] Failed to create branch trampoline."); return false; } - if (!g_localTrampoline.Create(1024)) { + if (!g_localTrampoline.Create(40)) { _FATALERROR("[FATAL ERROR] Failed to create codegen buffer."); return false; } From 7baf3781724d507cacc02e716f761ff41ea1a851 Mon Sep 17 00:00:00 2001 From: Sayuri <40526330+Umgak@users.noreply.github.com> Date: Wed, 28 Oct 2026 03:08:37 -0500 Subject: [PATCH 2/2] increase codegen buffer size SKSE validates that the size is not equal on EndAlloc --- src/RememberLockpickAngle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RememberLockpickAngle.cpp b/src/RememberLockpickAngle.cpp index af27366..44f3956 100644 --- a/src/RememberLockpickAngle.cpp +++ b/src/RememberLockpickAngle.cpp @@ -51,7 +51,7 @@ namespace RememberLockpickAngle { _FATALERROR("[FATAL ERROR] Failed to create branch trampoline."); return false; } - if (!g_localTrampoline.Create(40)) { + if (!g_localTrampoline.Create(64)) { _FATALERROR("[FATAL ERROR] Failed to create codegen buffer."); return false; }