Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Adélie Package Tree
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adélie Linux
Adélie Package Tree
Commits
12842f34
Verified
Commit
12842f34
authored
6 years ago
by
Anna Wilcox
Browse files
Options
Downloads
Patches
Plain Diff
system/libucontext: update URL, fix x86_64 crash
parent
b493aa58
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
system/libucontext/0001-Reorder-registers-in-other-assembler-files.patch
+45
-0
45 additions, 0 deletions
...ext/0001-Reorder-registers-in-other-assembler-files.patch
system/libucontext/APKBUILD
+7
-4
7 additions, 4 deletions
system/libucontext/APKBUILD
with
52 additions
and
4 deletions
system/libucontext/0001-Reorder-registers-in-other-assembler-files.patch
0 → 100644
+
45
−
0
View file @
12842f34
From 42c84cbe58c3c9089cc2a46a425210f20b47bcc9 Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Thu, 19 Jul 2018 17:17:26 -0500
Subject: [PATCH] Reorder registers in other assembler files
This fixes the previous commit which changed the register order in
swapcontext only, which caused setcontext to subtly corrupt the stack.
---
arch/x86_64/getcontext.S | 4 ++--
arch/x86_64/setcontext.S | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86_64/getcontext.S b/arch/x86_64/getcontext.S
index 7e56a1a..24cc1d3 100644
--- a/arch/x86_64/getcontext.S
+++ b/arch/x86_64/getcontext.S
@@ -22,8 +22,8 @@
__getcontext:
movq %r14, 88(%rdi)
movq %r15, 96(%rdi)
movq %rdi, 104(%rdi)
- movq %rbp, 112(%rdi)
- movq %rsi, 120(%rdi)
+ movq %rsi, 112(%rdi)
+ movq %rbp, 120(%rdi)
movq %rbx, 128(%rdi)
movq %rdx, 136(%rdi)
movq $1, 144(%rdi) /* $1 is %rax */
diff --git a/arch/x86_64/setcontext.S b/arch/x86_64/setcontext.S
index 607d40c..aba3775 100644
--- a/arch/x86_64/setcontext.S
+++ b/arch/x86_64/setcontext.S
@@ -21,8 +21,8 @@
__setcontext:
movq 80(%rdi), %r13
movq 88(%rdi), %r14
movq 96(%rdi), %r15
- movq 112(%rdi), %rbp
- movq 120(%rdi), %rsi
+ movq 112(%rdi), %rsi
+ movq 120(%rdi), %rbp
movq 128(%rdi), %rbx
movq 136(%rdi), %rdx
movq 144(%rdi), %rax
--
2.15.0
This diff is collapsed.
Click to expand it.
system/libucontext/APKBUILD
+
7
−
4
View file @
12842f34
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname
=
libucontext
pkgver
=
0.1.2
pkgrel
=
0
pkgrel
=
1
pkgdesc
=
"ucontext function implementations"
url
=
"http://git
hub.com
/kaniini/libucontext"
url
=
"http
s
://git
.dereferenced.org
/kaniini/libucontext
/
"
arch
=
"all"
license
=
"ISC"
depends
=
""
subpackages
=
"
$pkgname
-dev"
source
=
"https://distfiles.dereferenced.org/libucontext/libucontext-
$pkgver
.tar.xz"
source
=
"https://distfiles.dereferenced.org/libucontext/libucontext-
$pkgver
.tar.xz
0001-Reorder-registers-in-other-assembler-files.patch
"
case
"
$CTARGET_ARCH
"
in
armhf
)
LIBUCONTEXT_ARCH
=
"arm"
;;
...
...
@@ -32,4 +34,5 @@ package() {
make
ARCH
=
"
$LIBUCONTEXT_ARCH
"
DESTDIR
=
"
$pkgdir
"
install
}
sha512sums
=
"0c1d74341487d3128667abe9b6594f70c41b4e26bfff656c96eff5de55795f3f4186b3f46281503daf0ee3694a3c10966dd733a6779f49544759a5fe8e6fcdf5 libucontext-0.1.2.tar.xz"
sha512sums
=
"0c1d74341487d3128667abe9b6594f70c41b4e26bfff656c96eff5de55795f3f4186b3f46281503daf0ee3694a3c10966dd733a6779f49544759a5fe8e6fcdf5 libucontext-0.1.2.tar.xz
7f3904e5a10db88cfb3e201b0b370c8c04da5ef33fbf9e177a9bc2da5defbe984057c4be1d1e74672b59a9d4978cf0a7233dc3d661c53aeba355ea91d1ebc24b 0001-Reorder-registers-in-other-assembler-files.patch"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment