REBOL3 tracker
  0.9.12 beta
Ticket #0001732 User: anonymous

Project:



rss
TypeBug Statusbuilt Date29-Oct-2010 06:19
Versionalpha 109 CategoryHost-Kit Submitted byabolka
PlatformWindows Severityminor Prioritynormal

Summary Raise stack size for Win32 binaries built from the hostkit
Description Win32 binaries built from the hostkit should use the same stack size as the Win32 binaries built by RT. Currently, the hostkit binaries use a smaller stack than the RT binaries, which leads to a bunch of stack overflow crashes: #877, #1665, and #1672.

Carl mentions in the comments to #1672 that "If you set [the C runtime stack] to 5MB that will work, but the correct solution is to find a way for REBOL to detect the max stack size."

Until that correct solution is in place, the hostkit builds should use the same stack size as the RT builds to try and avoid this class of errors.
Example code

			

Assigned ton/a Fixed inr3 master Last Update20-Jan-2013 03:29


Comments
(0002727)
abolka
1-Nov-2010 06:22

Reposting part of my comment to #1672, which hints at the solution:

On Win32, the default stack size is a property of the PE binary. By default it is set to 1MB. To raise this limit using GCC/Binutils, use the `-Wl,--stack` flag when linking. So `-Wl,--stack,5242880` will set the stack size to 5MB. (For current hostkits, edit `make-gcc/makefile` and append this flag to the `LIBS` variable.)

Current RT-built binaries use a stack size of 4194300 bytes.
(0002742)
Carl
2-Nov-2010 00:33

In A110 the OS_Config() function has been added to the host-lib. It can be used to tell the REBOL lib the stack size of the process. If a zero is passed the default stack size is used (4194300).
(0002745)
abolka
2-Nov-2010 01:12

Very nice!
(0003273)
abolka
17-Dec-2012 00:34

Fixed in 8dc20083a40101bf0062a69d723fd702b5f98f60 which was merged in b212f8c2c0023f8b383c4eb131cdfb22db678a3b.

Date User Field Action Change
20-Jan-2013 03:29 abolka Status Modified complete => built
20-Jan-2013 03:28 abolka Fixedin Modified 2.101.0 => r3 master
17-Dec-2012 00:35 abolka Fixedin Modified alpha 110 => 2.101.0
17-Dec-2012 00:35 abolka Status Modified built => complete
17-Dec-2012 00:34 abolka Comment : 0003273 Added -
2-Nov-2010 01:12 abolka Comment : 0002745 Added -
2-Nov-2010 00:35 carl Comment : 0002742 Modified -
2-Nov-2010 00:33 carl Comment : 0002742 Modified -
2-Nov-2010 00:33 carl Comment : 0002742 Added -
2-Nov-2010 00:30 carl Fixedin Modified => alpha 110
2-Nov-2010 00:30 carl Status Modified reviewed => built
1-Nov-2010 06:22 abolka Comment : 0002727 Added -
31-Oct-2010 23:59 carl Description Modified -
31-Oct-2010 23:59 carl Status Modified submitted => reviewed
29-Oct-2010 06:19 abolka Ticket Added -