Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-patch] WordEntry out of bounds exception patch

> 
> 
> Folks,
> 
>   This patch addresses a problem which occurs when we are updating the
> index mappings for large projects.  It may only address the symptom,
> since I'm not totally up to speed on all the indexer logic yet, but 
> it is a valid case to consider.  When an index word reference is set 
> to:
> 
> reference[1 3 4] but there is a new mapping[1 2 3 4 5] then we iterate 
> the old references through the new mapping giving a new reference of
> newReference[mapping[1], mapping[3], mapping[4]] == [2 4 5].  If there
> are any invalid mappings (-1 or 0) then these are ignored in the new
> reference.
> 
> There is a problem however when the mapping has "shrunk" so that the
> reference is an index which is too large for the mapping ie
> reference[1 4696] and mapping[1 2] (ie the mapping is < 4696).  This
> should translate to (I believe) a new reference of [2] based on 
> the current logic which ignores -1 mappings.
> 
> All that to say, this is a range checking patch.  Without this patch
> a large source base may have to continuously re-index itself.  With
> this patch the index is considered valid and it only has to do a full
> index once.
> 
> Changelog
> 
> - Consider references outside of the mapping range the same as no longer
>   valid mappings (ie -1 entries) and avoid array range exceptions.
> 

Bogdan,
  let me know if this is a nay or yay for head && branch.

Thanks.



Back to the top