To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CA%2B6sJ-0Pd9WYDd95jnXFEONgfySWYUK5vVOCneTyFOo42c6C_Q%40mail.gmail.com.
> This will allow stack overflow to instantly wrap/trap rather than corrupting static data first.This would be perfect IMHO. Why not also do this for optimized builds, are there performance problems with placing the stack at the bottom of the heap?
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/135251cf-08b6-46d6-a762-2f68629ae1b8n%40googlegroups.com.
Cheers!
--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/71303cf3-2d27-4dfa-b17c-bf000edddca6n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-MeYutvr6j-zvQqEDdQbj-Hw%2BJnBwNHS5vcnJxyNxR5g%40mail.gmail.com.
Hi Sam,
We have a pretty big project and it is possible that we run into
issues if stack size is minimalized.
We are OK, if the default stack size could be set with
-sTOTAL_STACK.
Thank you,
Imre
--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/0ef02392-4a8b-4442-a48c-957570977659n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/d7c00f7e-6bc2-4ae8-ae2d-0353ae4cff80n%40googlegroups.com.
My C code is still quite stack heavy, because a lot of my code essentially uses the stack as per-frame arena allocator ;) But I guess as long as there's a compiler/linker option to set the stack size I think it's fine.Will a stack overflow cause a proper runtime error, or will this result 'undefined behaviour'?
--On Tuesday, 11 October 2022 at 01:34:07 UTC+2 s...@google.com wrote:Bumping this discussion because I'm taking a look at landing this once again.In answer to the pthread question: Yes I'm planning on changing the default for both the main thread and pthreads (The plan is to make them the same by default).On Fri, Jul 9, 2021 at 3:24 AM 'Maksim Ivanov' via emscripten-discuss <emscripte...@googlegroups.com> wrote:One question: Will this planned change only affect is only for the main thread? In case there's no change for background threads (e.g., created via pthreads), it'll be useful to mention it somewhere.On Thursday, May 27, 2021 at 2:01:11 PM UTC+2 jj wrote:ke 19. toukok. 2021 klo 11.27 Floh (flo...@gmail.com) kirjoitti:
> 1 MB is quite certainly ok (but might be a problem for code with lots of recursions?), but I think 64 KByte is asking for trouble ;)
Btw, I would recommend you to try how small you can go. I would be
surprised if you are running into issues with 64KB today. (recursions
won't increase to this limit, unless the recursing functions have
locals that have their addresses taken)--You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/d7c00f7e-6bc2-4ae8-ae2d-0353ae4cff80n%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/7c70d4dc-d14b-4282-9a82-1c1e08393dd0n%40googlegroups.com.
PS: what would be *really* nice is a way to query the current and 'high water mark' stack sizes (only in debug mode, or with a specific build option), to get an idea how much stack a program/thread is using, instead of depending on trial-and-error.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/218eec81-edce-45b7-b061-a1d57f381d3an%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-tLd_%3Dbsx86g8gqS%3Dg%3D_WRk_UjRZEEau2WmkPFMv1K9w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAFnWYTm8Xa1SpOKgMDFJ0W8a1YGyJrbiMhCMF2A6t1Xg18V_RQ%40mail.gmail.com.
How about adding an API like:Emscripten_extendStackIfNeeded(callback), which could be inserted anywhere stack depth might be an issue and would launch another coroutine if the stack was almost used up, swap to it, and swap back on return or exception?
On Tuesday, May 18, 2021 at 1:21:01 PM UTC-7 s...@google.com wrote:I have an open PR to reduce the default stack size in emscripten from 5Mb to 1Mb, and we are also considering reducing it even furthur (possibly to 64Kb which is the wasm-ld default, or to 128Kb, which is the musl default): https://github.com/emscripten-core/emscripten/pull/14177.How many folks out there have run into stack limits with the current limit of 5Mb? How many folks are worried they would run into limits if we reduce the default to 1Mb, 128Kb or 64Kb? Would those who feel they need more stack be OK adding `-sTOTAL_STACK` to their link command to request a higher limit? (feel free to respond there, or on the issue above).cheers,sam
--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/4444d68e-5d77-448c-9e97-2cf11e8f0e09n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/d3e50a8a-713e-4ac7-abe2-c5ddd781d702n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/f4dc650d-4ceb-4ebb-aabf-d875ca2007f2n%40googlegroups.com.