Closed Bug 686932 Opened 13 years ago Closed 7 years ago

incorrect valgrind annotation - accessing run->bin after VALGRIND_FREELIKE_BLOCK(run, 0);

Categories

(Core :: Memory Allocator, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: igor, Unassigned)

References

Details

Attachments

(1 file)

arena_dalloc_small from jemalloc.c contains, http://hg.mozilla.org/mozilla-central/file/f3f5d8a8a473/memory/jemalloc/jemalloc.c#l4212 ,

  4212 		VALGRIND_FREELIKE_BLOCK(run, 0);
  4213 		arena_run_dalloc(arena, run, true);

However, arena_run_dalloc dereferences run->bin at http://hg.mozilla.org/mozilla-central/file/f3f5d8a8a473/memory/jemalloc/jemalloc.c#l3393 leading to valgrind reporting an error when that line is reached. As far as I can see this is a regression from bug 446096.
Attached patch v1Splinter Review
The patch moves VALGRIND_FREELIKE_BLOCK to arena_run_dalloc where it is called after run->bin access.
Assignee: nobody → igor
Attachment #560525 - Flags: review?(jasone)
I think either Nicholas Nethercote or Julian Seward re-did the valgrind support in jemalloc, so one of them would be a better reviewer for this.
(In reply to Jason Evans from comment #2)
> I think either Nicholas Nethercote or Julian Seward re-did the valgrind
> support in jemalloc, so one of them would be a better reviewer for this.

Hm, hg log shows that the last valgrind-related changesets to jemalloc.c came from jasone@canonware.com ;)
Assignee: igor → nobody
Attachment #560525 - Flags: review?(jasone)
Bug 1057754 removed those annotations.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: