Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SH: makecontext: exit (0) if uc_link is the null pointer.
  • Loading branch information
Thomas Schwinge committed Jul 17, 2012
1 parent f7db317 commit 07cbfc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog
@@ -1,5 +1,8 @@
2012-07-17 Thomas Schwinge <thomas@codesourcery.com>

* sysdeps/unix/sysv/linux/sh/makecontext.S (.Lexitcode): Preserve
zero value for regular exit case.

* sysdeps/unix/sysv/linux/x86_64/__start_context.S
(__start_context): Preserve zero value for regular exit case.

Expand Down
3 changes: 2 additions & 1 deletion sysdeps/unix/sysv/linux/sh/makecontext.S
Expand Up @@ -128,14 +128,15 @@ ENTRY(__makecontext)
cfi_restore (pr)
/* If this returns (which can happen if the syscall fails) we'll exit
the program with the return error value (-1). */
mov r0, r4

2:
mov.l .Lexit, r1
#ifdef PIC
add r12, r1
#endif
jsr @r1
mov r0, r4
nop
/* The 'exit' call should never return. In case it does cause the
process to terminate. */
ABORT_INSTRUCTION_ASM
Expand Down

0 comments on commit 07cbfc2

Please sign in to comment.