From: Chris Metcalf <cmetcalf@tilera.com>
To: <libc-ports@sourceware.org>
Subject: [PATCH] tile: exit with status zero on makecontext return with NULL uc_link
Date: Tue, 17 Jul 2012 18:40:00 -0000 [thread overview]
Message-ID: <201207171839.q6HIdvYi007716@farm-0002.internal.tilera.com> (raw)
---
Tile was correctly calling exit() on a NULL uc_link, but not actually
setting the exit code to any particular value. We want exit(0), so
change the assembly to make it happen that way.
ports/ChangeLog.tile | 3 +++
ports/sysdeps/unix/sysv/linux/tile/setcontext.S | 5 ++++-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/ports/ChangeLog.tile b/ports/ChangeLog.tile
index bd5e067..2335171 100644
--- a/ports/ChangeLog.tile
+++ b/ports/ChangeLog.tile
@@ -1,5 +1,8 @@
2012-07-17 Chris Metcalf <cmetcalf@tilera.com>
+ * sysdeps/unix/sysv/linux/tile/setcontext.S: Ensure exit status is
+ zero if uc_link is NULL.
+
* sysdeps/tile/libm-test-ulps: Account for new tests.
* data/c++-types-tilepro-linux-gnu.data: Move to ...
diff --git a/ports/sysdeps/unix/sysv/linux/tile/setcontext.S b/ports/sysdeps/unix/sysv/linux/tile/setcontext.S
index f95ad7c..587097e 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/setcontext.S
+++ b/ports/sysdeps/unix/sysv/linux/tile/setcontext.S
@@ -196,6 +196,9 @@ ENTRY (__startcontext)
move r0, r30
jal __setcontext
}
-1: j HIDDEN_JUMPTARGET(exit)
+1: {
+ movei r0, 0
+ j HIDDEN_JUMPTARGET(exit)
+ }
END (__startcontext)
.hidden __startcontext
--
1.7.1
reply other threads:[~2012-07-17 18:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201207171839.q6HIdvYi007716@farm-0002.internal.tilera.com \
--to=cmetcalf@tilera.com \
--cc=libc-ports@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).