Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2018 18:00:23 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328632 - head/lib/libc/mips/gen
Message-ID:  <201801311800.w0VI0NFA035711@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Wed Jan 31 18:00:23 2018
New Revision: 328632
URL: https://svnweb.freebsd.org/changeset/base/328632

Log:
  Remove limitation of 6 arguments for makecontext() on mips.
  
  This implementation spills additional arguments on the stack so works
  fine with more than 6 arguments.  I believe the check was just copied
  over from sparc64 (which doesn't support spilling onto the stack)
  
  Sponsored by:	DARPA / AFRL

Modified:
  head/lib/libc/mips/gen/makecontext.c

Modified: head/lib/libc/mips/gen/makecontext.c
==============================================================================
--- head/lib/libc/mips/gen/makecontext.c	Wed Jan 31 17:57:59 2018	(r328631)
+++ head/lib/libc/mips/gen/makecontext.c	Wed Jan 31 18:00:23 2018	(r328632)
@@ -66,7 +66,7 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int
 	 * so that we can mark a context as invalid.  Store it in
 	 * mc->mc_regs[ZERO] perhaps?
 	 */
-	if (argc < 0 || argc > 6 || ucp == NULL ||
+	if (argc < 0 || ucp == NULL ||
 	    ucp->uc_stack.ss_sp == NULL ||
 	    ucp->uc_stack.ss_size < MINSIGSTKSZ)
 		return;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801311800.w0VI0NFA035711>