curl-and-python

Re: Crash inside dup()

From: Gisle Vanem <gvanem_at_yahoo.no>
Date: Mon, 23 Dec 2013 14:28:27 +0100

I'm resending this reply since it got stuck somewhere. It didn't
show up for 5 hours.

"Oleg Pudeyev" <oleg+pycurl_at_bsdpower.com> wrote:

> Please check https://github.com/pycurl/pycurl/pull/106.

It works fine now. Please push it.

BTW. you may change this from:
  dup_winsock(SOCKET sock, struct curl_sockaddr *address)

to
  dup_winsock(SOCKET sock, const struct curl_sockaddr *address)

BTW2. I accidentally did a:
  setup.py install --curl-dir=.. --use-libcurl-dll \
  --libcurl-lib-name=libcurld_imp.lib << !! debug-version of CRT.

which on running a script in examples, produced a:

  Fatal Python error: pycurl: libcurl link-time version is older than compile-time version

  This application has requested the Runtime to terminate it in an unusual way.
  Please contact the application's support team for more information.

Then a crash-dump from WinDbg:

  ntdll!KiFastSystemCallRet
  ntdll!NtTerminateProcess+0xc
  kernel32!_ExitProcess+0x62
  kernel32!ExitProcess+0x14
  MSVCR90!__crtExitProcess+0x17
  MSVCR90!_cinit+0x154
  MSVCR90!_exit+0x11
  MSVCR90!abort+0x116
  WARNING: Stack unwind information not available. Following frames may be wrong.
  python27!Py_FatalError+0x8b
  pycurl!initpycurl(void)+0x2364 [g:\mingw32\src\inet\curl\pycurl\src\pycurl.c @ 4990]
  python27!PyImportHooks_Init+0x213

I'm not sure this is due to 'assert(0)' of my attempt to mix release/debug CRTs.
Isn't there a more elegant way to abort things?

--gv

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2013-12-23