Patchwork libgo patch committed: Mark varargs function no_split_stack for Clang

login
register
mail settings
Submitter Ian Taylor
Date July 20, 2014, 9:24 a.m.
Message ID <mcrsilwjscc.fsf@iant-glaptop.roam.corp.google.com>
Download mbox | patch
Permalink /patch/371879/
State New
Headers show

Comments

Ian Taylor - July 20, 2014, 9:24 a.m.
This patch from Peter Collingbourne marks the varargs function
runtime_sprintf as no_split_stack when using Clang.  Apparently Clang
does not support split-stack for varargs function.  Bootstrapped and ran
Go testsuite on x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

Patch

diff -r ca381cdd378c libgo/runtime/print.c
--- a/libgo/runtime/print.c	Sat Jul 19 14:35:30 2014 -0700
+++ b/libgo/runtime/print.c	Sun Jul 20 02:13:45 2014 -0700
@@ -76,9 +76,15 @@ 
 // x86-64. Note that signal handlers receive slightly less stack space than they
 // would normally do if they happen to be called while this function is being
 // run. If this turns out to be a problem we could consider increasing BACKOFF.
+
 void
 runtime_printf(const char *s, ...)
 __attribute__((no_split_stack));
+
+int32
+runtime_snprintf(byte *buf, int32 n, const char *s, ...)
+__attribute__((no_split_stack));
+
 #endif
 
 void