Closed Bug 1089932 Opened 8 years ago Closed 8 years ago

Ignore replace_malloc allocation function pointers

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: sfink, Assigned: sfink)

References

Details

Attachments

(1 file)

glandium is running into problems where he sees thousands of analysis failures. They all boil down to something like:

    PR_Calloc
    calloc
    replace_calloc
    FieldCall: malloc_table_t.calloc

(ie, all of the allocation functions go through a function pointer that we don't recognize.)

Oddly, this failure is intermittent. I believe that is because normally replace_malloc is loaded via LD_PRELOAD, so the analysis doesn't see it. But something compiles it in directly, possibly just a test file. I am guessing that that something has the same name as something else, and it's a race to see which one gets compiled last (the later ones will override.)

glandium's patch changes compilation ordering, which would be why it would start failing reliably for him.

I'm a little curious why we have the same filename compiled multiple times in different ways, but I guess that's not really all that uncommon.
The fix is straightforward even if the problem is not.
Attachment #8512323 - Flags: review?(terrence)
Attachment #8512323 - Flags: review?(terrence) → review+
The something that links replace-malloc directly is memory/replace/logalloc/replay.
(In reply to Mike Hommey [:glandium] from comment #2)
> The something that links replace-malloc directly is
> memory/replace/logalloc/replay.

... but it only links the _impl part, not the part that *does* use malloc_table_t...
Blocks: 1077148
https://hg.mozilla.org/mozilla-central/rev/5422ee0c1808
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.