Naked uses of alloca()

VERIFIED FIXED in flash10.1

Status

P3
normal
VERIFIED FIXED
10 years ago
9 years ago

People

(Reporter: treilly, Assigned: lhansen)

Tracking

unspecified
flash10.1
ARM
Symbian
Bug Flags:
flashplayer-qrb +

Details

(Whiteboard: Has patch)

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
After Rishit is done make sure all OS calls go through VMPI layer

There are calls to alloca in GCHeap::DumpHeapRep, but that's not portable and
the function is not protected by any kind of #ifdef DESKTOP_DEBUGGING (for
instance).
(Assignee)

Comment 1

10 years ago
Hopefully the removal of fprintf will also fix the problem with wrong-size arguments being passed to fprintf (ie, size_t is sometimes 32 and sometimes 64 bits, so it's never correct to use %u or %lu or %llu -- only a cast to a specific size is guaranteed to work).  GCC spews copious warnings for this problem in the new GC code.

Updated

10 years ago
Blocks: 481413

Updated

10 years ago
No longer blocks: 478870
(Assignee)

Updated

10 years ago
Blocks: 481683
No longer blocks: 481413

Updated

10 years ago
Flags: flashplayer-qrb+
Priority: -- → P3
Target Milestone: --- → Future
(Assignee)

Updated

10 years ago
Priority: P3 → --
Target Milestone: Future → ---
(Assignee)

Comment 2

10 years ago
At least three uses of alloca(), one in GCMemoryProfiler and two in GCHeap.

I've spotted memset() or memcpy() or similar calls, but won't try to find them now.

We can probably machine-search the code for these; if a good script can be found it can become part of the build system.
OS: Mac OS X → Symbian
Priority: -- → P3
Hardware: x86 → ARM
Summary: GC porting cleanup → Naked uses of alloca()
Target Milestone: --- → flash10.1
(Assignee)

Comment 3

10 years ago
This has too many false positives and doesn't capture everything, but it does filter enough for a quick scan; I can't find any other offenders in the code as it is now (except for alloca):

for n in $(egrep '# *define +VMPI_' platform/mac/mac-platform.h | awk '{ print substr($2,6) }'); do find . -name '*.h' -o -name '*.cpp' | xargs grep '[^_A-Za-z0-9]'$n'[^(a-zA-Z0-9_]' | grep -v '# *define' ; done
(Assignee)

Comment 4

9 years ago
Created attachment 410495 [details] [diff] [review]
Removes all uses of alloca in core code
Assignee: nobody → lhansen
Status: NEW → ASSIGNED
Attachment #410495 - Flags: review?(treilly)
(Assignee)

Updated

9 years ago
Whiteboard: Has patch
(Reporter)

Updated

9 years ago
Attachment #410495 - Flags: review?(treilly) → review+
(Assignee)

Comment 5

9 years ago
redux changeset:   3001:14fa373461cd
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED

Comment 6

9 years ago
Engineering work item.  Marking as verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.