Paul McCullagh wrote:
> On May 27, 2009, at 7:53 PM, Nathan Williams wrote:
> 
>> On Wed, May 27, 2009 at 5:52 AM, Paul McCullagh
>> <[email protected]> wrote:
>>> A recent change to the String class (sql_string.h) causes a crash or
>>> overwrite.
>>>
>> Out of curiosity, is this crash in a current test or something else
>> you were working on?
> 
> I get the error when running the current tests using PBXT as the default
> engine:
> 
> ./dtr --engine=pbxt
> 
> The tree I am using is lp:~drizzle-pbxt/drizzle/drizzle-pbxt-2.

Cool. Now that you're mergable - I'll make sure that my new String fixes
don't break pbxt too. :)(

>>> It may not be safe because the user of c_ptr may not always be able to
>>> assume the zero terminator will remain zero.
>>>
>>> For this purpose we have String::c_ptr_safe().
>>>
>> Ideally, but there are places that call c_ptr and expect it to be null
>> terminated - the group_by and myisam tests are the ones I remember.
>> The original implementation always called String::realloc, which not
>> only allocates a larger buffer but also places a null terminator.
> 
> Yes. Calling String::realloc() should be avoided when possible it is
> expensive.
> 
> -- 
> Paul McCullagh
> PrimeBase Technologies
> www.primebase.org
> www.blobstreaming.org
> pbxt.blogspot.com
> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~drizzle-discuss
> Post to     : [email protected]
> Unsubscribe : https://launchpad.net/~drizzle-discuss
> More help   : https://help.launchpad.net/ListHelp
> 


_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to