09.12.2020 12:21, Alex Peshkoff via Firebird-devel wrote:
  During such self assignment returned pointer can be invalidated by setErrors() code before using input parameter which may cause crash or wrong result.


Builtin implementation works fine with your particular sample.

Not quite so. It works only because both errors and warning vectors used to be empty at that point so the pointers are point to the inline storage. If heap storage is used (for example after IProvider::attachDatabase() returned massive warnings), call to clean() in setWarnings() will invalidate the pointer.

Where does it happen in yvalve?

I've found it in Dispatcher::attachOrCreateDatabase() and Dispatcher::attachServiceManager() but there can be more.

--
  WBR, SD.


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to