From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/3] musl: Fix clock_gettime on 32-bit archs without vdso
Date: Mon, 5 Aug 2019 12:34:30 -0700 [thread overview]
Message-ID: <20190805193431.32053-2-raj.khem@gmail.com> (raw)
In-Reply-To: <20190805193431.32053-1-raj.khem@gmail.com>
This was seen in x86 code being run via qemu-user ending in
(process:883): GLib-ERROR **: 22:28:34.117: GLib requires working CLOCK_MONOTONIC
qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...n-clock_gettime-on-32-bit-archs-with.patch | 30 +++++++++++++++++++
meta/recipes-core/musl/musl_git.bb | 1 +
2 files changed, 31 insertions(+)
create mode 100644 meta/recipes-core/musl/musl/0001-fix-regression-in-clock_gettime-on-32-bit-archs-with.patch
diff --git a/meta/recipes-core/musl/musl/0001-fix-regression-in-clock_gettime-on-32-bit-archs-with.patch b/meta/recipes-core/musl/musl/0001-fix-regression-in-clock_gettime-on-32-bit-archs-with.patch
new file mode 100644
index 0000000000..d89fcee4f3
--- /dev/null
+++ b/meta/recipes-core/musl/musl/0001-fix-regression-in-clock_gettime-on-32-bit-archs-with.patch
@@ -0,0 +1,30 @@
+From 192c8e18c0f502fe8269b075c21e58290f875182 Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Mon, 5 Aug 2019 12:01:13 -0400
+Subject: [PATCH] fix regression in clock_gettime on 32-bit archs without vdso
+
+commit 72f50245d018af0c31b38dec83c557a4e5dd1ea8 broke this by creating
+a code path where r is uninitialized.
+
+Upstream-Status: Submitted
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/time/clock_gettime.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/time/clock_gettime.c b/src/time/clock_gettime.c
+index 63e9f9c8..3e1d0975 100644
+--- a/src/time/clock_gettime.c
++++ b/src/time/clock_gettime.c
+@@ -73,6 +73,7 @@ int __clock_gettime(clockid_t clk, struct timespec *ts)
+ #endif
+
+ #ifdef SYS_clock_gettime64
++ r = -ENOSYS;
+ if (sizeof(time_t) > 4)
+ r = __syscall(SYS_clock_gettime64, clk, ts);
+ if (SYS_clock_gettime == SYS_clock_gettime64 || r!=-ENOSYS)
+--
+2.22.0
+
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index bf6f983dc0..87eec31a0f 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -15,6 +15,7 @@ PV = "${BASEVER}+git${SRCPV}"
SRC_URI = "git://git.musl-libc.org/musl \
file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
+ file://0001-fix-regression-in-clock_gettime-on-32-bit-archs-with.patch \
"
S = "${WORKDIR}/git"
--
2.22.0
next prev parent reply other threads:[~2019-08-05 19:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-05 19:34 [PATCH 1/3] groff: Fix math.h inclusion from system headers issue Khem Raj
2019-08-05 19:34 ` Khem Raj [this message]
2019-08-05 19:34 ` [PATCH 3/3] webkitgtk: Fix compile failures with clang Khem Raj
2019-08-05 20:01 ` ✗ patchtest: failure for "groff: Fix math.h inclusion fr..." and 2 more Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190805193431.32053-2-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox