Last Comment Bug 620291 - useless assert of free_block [@ CodeAlloc::free]
: useless assert of free_block [@ CodeAlloc::free]
Status: RESOLVED FIXED
fixed-in-nanojit, fixed-in-tracemonke...
: coverity, crash
Product: Core Graveyard
Classification: Graveyard
Component: Nanojit (show other bugs)
: Trunk
: All All
: -- critical (vote)
: ---
Assigned To: timeless
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-19 14:10 PST by timeless
Modified: 2014-03-17 08:00 PDT (History)
6 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
drop null checks (1.08 KB, patch)
2010-12-19 20:50 PST, timeless
gal: review+
edwsmith: review+
Details | Diff | Splinter Review

Description timeless 2010-12-19 14:10:44 PST
147     void CodeAlloc::free(NIns* start, NIns *end) {

182                     CodeList* free_block = availblocks;

there's no point in using free_block as a loop control:
183                     while ( free_block && free_block->next != coalescedBlock) {
184                         NanoAssert(free_block->size() >= minAllocSize);
185                         NanoAssert(free_block->isFree);
186                         NanoAssert(free_block->next);
187                         free_block = free_block->next;
188                     }
or asserting it:
189                     NanoAssert(free_block && free_block->next == coalescedBlock);

if you're just going to crash anyway:
190                     free_block->next = coalescedBlock->next;
Comment 1 timeless 2010-12-19 20:50:40 PST
Created attachment 498683 [details] [diff] [review]
drop null checks
Comment 2 Phil Ringnalda (:philor) 2011-02-06 09:24:03 PST
http://hg.mozilla.org/tracemonkey/rev/a26c9e7823e4
Comment 3 Phil Ringnalda (:philor) 2011-02-06 09:38:27 PST
Urg, and backed out in http://hg.mozilla.org/tracemonkey/rev/8e517eae885d when I suddenly realized *why* edwsmith was reviewing it. Maybe if it's in the nanojit component, I'll realize it's not something I want to push.
Comment 4 Chris Leary [:cdleary] (not checking bugmail) 2011-02-06 16:55:49 PST
cdleary-bot mozilla-central merge info:
http://hg.mozilla.org/mozilla-central/rev/a26c9e7823e4
Note: not marking as fixed because fixed-in-tracemonkey is not present on the whiteboard.
Comment 5 Chris Leary [:cdleary] (not checking bugmail) 2011-02-06 17:39:48 PST
http://hg.mozilla.org/mozilla-central/rev/8e517eae885d (backout)
Comment 6 Rob Campbell [:rc] (:robcee) 2011-03-01 04:56:38 PST
this was backed-out but still has a checkin-needed flag. Needs fixin'?
Comment 7 timeless 2011-03-02 09:41:21 PST
i think it's something that would want to be pushed or managed by someone from nanojit to a nanojit tree instead of to a tracemonkey/m-c tree.
Comment 8 Nicholas Nethercote [:njn] 2011-03-02 21:10:29 PST
http://hg.mozilla.org/projects/nanojit-central/rev/265c59717027
Comment 9 Nicholas Nethercote [:njn] 2011-03-03 14:36:31 PST
http://hg.mozilla.org/tracemonkey/rev/f7f0892c9807
Comment 10 Tamarin Bot 2011-03-14 16:15:35 PDT
changeset: 6079:aaee24b632ed
user:      timeless@mozdev.org
summary:   Bug 620291 - useless assert of free_block [@ CodeAlloc::free].  r=gal,edwsmith.

http://hg.mozilla.org/tamarin-redux/rev/aaee24b632ed

Note You need to log in before you can comment on or make changes to this bug.