Closed Bug 456054 Opened 16 years ago Closed 16 years ago

TC uses fixed 512K stack for all platforms except windows

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: lhansen, Assigned: lhansen)

References

Details

Attachments

(1 file)

See Shell::computeStackBase in avmshell.cpp. A hard limit is wrong on every system - on small systems it's too high, on large systems too low. Presumably products incorporating TC does better, but we should do better for the shell too.
Depends on: 467591
The Windows code is OK. On Mac and Linux we should use getrlimit(). This has anyway been factored into the platform layer.
Blocks: 487199
Attached patch Bug fix, v1Splinter Review
The fix has several aspects: - Platform::getStackBase is renamed as Platform::getMainThreadStackLimit (all together now, this does not make sense on a thread stack) and is given proper documentation about that and other things - On Mac and Unix, the code that creates the Platform object passes in an estimate of the stack base (highest address) so that the above mentioned method will have something to work from - The method implementations on Mac and Unix use the Posix getrlimit() system call to obtain the stack size, and computes the true stack limit based on the stack base and the stack size - On /all/ platforms, a /standardized/ slop for native code is added to the limit. We know this slop not to be as good as it needs to be (because we don't know how much space native code might need, for one thing) but it's better to do it the same way across the board than differently on different platforms.
Assignee: nobody → lhansen
Status: NEW → ASSIGNED
Attachment #374603 - Flags: review?(edwsmith)
Attachment #374603 - Flags: review?(edwsmith) → review+
redux changeset: 1793:45a3367b83b4
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Depends on: 496942
No longer depends on: 496942
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: