This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix htab lookup bug in reregister_specialization (issue5190046)


On 10/05/2011 04:05 PM, Jakub Jelinek wrote:
BTW, register_specialization has the same problems.  If slot != NULL and fn
== NULL, it can still return without storing non-NULL into *slot
(when optimize_specialization_lookup_p (tmpl) returns non-zero).
You can do else if (slot != NULL&&  fn == NULL) htab_clear_slot (decl_specializations, slot);

I don't think there's a problem in that function; if fn == NULL, then we store spec in its place.


If you never insert, it should be htab_find only (with spec_entry * instead
of spec_entry ** variable).

Makes sense.


Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]