Closed Bug 539022 Opened 15 years ago Closed 15 years ago

HEAP_ALLOCA should be defined for Windows builds with RTC enabled

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

All
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
flash10.1

People

(Reporter: stejohns, Unassigned)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
MSVC has a debug facility that checks for overwrites of stack variables, including alloca usage. Unfortunately, this checking doesn't work properly with longjmp/setjmp and will get all crashy in some configurations, eg

void foo()
{
    jmp_buf jb;
	if (!setjmp(jb))
	{
	    long* aa = (long*)alloca(8);
	    longjmp(jb, 1);
	}
}

(note that this is the case whether you use msvc's normal longjmp, or our hacked no-unwind longjmp)

(note also that no such code construct appears to be in use in Tamarin itself, but embedders might be subject to it)

Fortunately, solution is simple: enable HEAP_ALLOCA for these builds.
Comment on attachment 421085 [details] [diff] [review]
Patch

Note that this patch also adds the missing-but-necessary define for Symbian, as well
Attachment #421085 - Attachment is patch: true
Attachment #421085 - Attachment mime type: application/octet-stream → text/plain
Attachment #421085 - Flags: review?(lhansen)
Attachment #421085 - Flags: review?(lhansen) → review+
http://hg.mozilla.org/tamarin-redux/rev/8098ac5d12ad
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Flags: flashplayer-qrb+
Target Milestone: --- → flash10.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: