Closed Bug 480984 Opened 15 years ago Closed 15 years ago

Naked uses of alloca()

Categories

(Tamarin Graveyard :: Garbage Collection (mmGC), defect, P3)

ARM
Symbian
defect

Tracking

(Not tracked)

VERIFIED FIXED
flash10.1

People

(Reporter: treilly, Assigned: lhansen)

References

Details

(Whiteboard: Has patch)

Attachments

(1 file)

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).
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.
Blocks: 481413
No longer blocks: 478870
Blocks: 481683
No longer blocks: 481413
Flags: flashplayer-qrb+
Priority: -- → P3
Target Milestone: --- → Future
Priority: P3 → --
Target Milestone: Future → ---
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
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: nobody → lhansen
Status: NEW → ASSIGNED
Attachment #410495 - Flags: review?(treilly)
Whiteboard: Has patch
Attachment #410495 - Flags: review?(treilly) → review+
redux changeset:   3001:14fa373461cd
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
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.

Attachment

General

Creator:
Created:
Updated:
Size: