https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
--- Comment #12 from Jakub Kulik ---
One thing that is still slightly limiting is that the stack size cannot be
changed e.g. for individual tests when running the libgo test suite.
It might be nice to have some exported interface, such as the a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
--- Comment #11 from Jakub Kulik ---
So, I looked into it and with the patch attached above seems to work as
expected. Stack can be resized like this `GODEBUG=minstacksize=32 ./test`.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
--- Comment #10 from Jakub Kulik ---
Created attachment 53935
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53935&action=edit
Proposed patch with configurable minimal stack size
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
--- Comment #9 from Ian Lance Taylor ---
I would suggest adding a new field to the GODEBUG parsing in
go/runtime/runtime1.go and then calling a new C function defined in
libgo/runtime/proc.c to store the value in a C static variable.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
--- Comment #8 from Jakub Kulik ---
Sure, this was just a quick first test. That said, GODEBUG is slightly more
complex - is there an example of a C code where GODEBUG variables are being
used you can point me to (I found only go sources with an
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
--- Comment #7 from Ian Lance Taylor ---
If we use an environment variable, we should probably use the existing GODEBUG
variable.
Making the stack headroom large enough all the time should be possible. It
will burn a lot of memory on stacks bu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
--- Comment #6 from Jakub Kulik ---
So, I tested it with the following simple change and it works nicely:
--- gcc-12.2.0/libgo/runtime/proc.c
+++ gcc-12.2.0/libgo/runtime/proc.c
@@ -798,7 +798,15 @@ runtime_malg(bool allocatestack, bool si
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
--- Comment #5 from Ian Lance Taylor ---
Good point, I did forget about using gold or lld. Sorry.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
--- Comment #4 from Jakub Kulik ---
Thanks for the confirmation.
-fsplit-stack on Solaris would be nice, but it's as simple as designating a TLS
accessible slot, right? We have our own linker on Solaris and don't use gold,
and I am not how feas
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
--- Comment #3 from Ian Lance Taylor ---
The stack size on a system that does not support -fsplit-stack is set by
StackMin in libgo/runtime/stack.c. There is currently no way to override the
default value of 4MB, but we could probably add one b
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
--- Comment #2 from Jakub Kulik ---
That's what I thought, but I am not sure whether there is supposed to be a
different mechanism on other platforms or whether the 4MB stack cap per thread
is the maximum I can get on non Linux platform.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
Eric Botcazou changed:
What|Removed |Added
CC||ebotcazou at gcc dot gnu.org
Ever c
12 matches
Mail list logo