Search Postgresql Archives

Re: PQtrace doesn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom Lane wrote:
> Bruce Momjian <pgman@xxxxxxxxxxxxxxxx> writes:
> > Daniel Verite wrote:
> >> So it looks like the problem would be DLL-related?
> 
> > Is there a problem with a DLL writing to a file descriptor opened by
> > application code?  I would think not, but perhaps.
> 
> Hmm .... malloc/free are broken in exactly that way in Windows DLLs,
> maybe stdio has the same kind of issue?  I'd think this would be pretty
> well known if true, though.

Ah, I have found the cause of the crash, and added documentation about
the cause:

        On Win32, if the <application>libpq</> and the application are
        compiled with different flags, this function call will crash the
        application because the internal representation of the <literal>FILE</>
        pointers differ.

While such a mismatch is a problem on all platforms, it is more common
on Win32 where the FILE structure changes for debug, for example.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@xxxxxxxxxxxxxxxx               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux