Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Terrence,

        First - it's awesome to have you looking at, reading and caring about
the ODBC code - that's brilliant.

On Thu, 2011-09-29 at 12:02 -0400, Terrence Enger wrote:
Silly me!  While reading some of the LibreOffice code for
ODBC connections, I started to look at ...
..
This passage in section "4.4.1 Handles" catches my eye:

    The validity of a handle in a compilation unit other
    than the one in which the identified resource was
    allocated is implementation-defined.

Yikes!  How can any large (or moderate sized) project avoid
assuming the validity of ODBC handles across the boundaries
of compilation units ?

        Well - particularly since there is no possible work-around beyond
munging everything into one big beast of a C++ file ;-)

  LibreOffice seems to assume continued validity;

        Sure - anything else would seem to imply a madness on the side of the
ODBC implementation author that would amount to perversity ;-) are these
methods really going (at run-time) to walk up the stack, find where the
caller came from, work out which object file it was and then do
'undefined' things if the next call on the handle comes from somewhere
else.

(*) What ODBC driver invalidates an ODBC handle across
    compilation unit boundaries?

        I have no idea - but unless I totally misunderstood this I'd be amazed
if any did.

(*) By what magic can the driver know anything about its
    caller's compilation units, anyway?

        Quite ;-) I mean - "in the same DSO" might be feasibly detectable
but ...

Will some kind soul here please tell me that I need not
worry about such things?

        Certainly - you don't need to worry about such things ;-) most of the
legacy bugs in the LibreOffice code are of the more startlingly obvious
kind (in my experience), and in the connectivity world often have a
helpful: // TODO - actually implement this ;-) next to them.

        Does that help !

        Out of interest which bug / feature are you chasing ? (and do you hang
out on IRC ? :-).

        All the best,

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.