← Back to team overview

drizzle-discuss team mailing list archive

Re: libdrizzle: drizzle_result_create on a used result structure?

 

Hi Evan,

> Fair enough. Unfortunately, one way to "catch" this error happens
> pretty late: when trying to free result structures, you can look for
> the single circular list item that was causing a loop (->next == -
> >prev == current). However, at this point some corruption may have
> already occurred, and it might be confusing to debug this error.
> Thus, I'm not sure if adding a check for this is particularly
> useful.

I think how you made the check is just fine, check on insert to
the list before any corruption can occur. I'm thinking to just add
the 'sanity check' flag around your patch and modify it to scan
all connections. This would prevent ever getting to the state you
mention above.

-Eric



References