From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30019 invoked by alias); 29 Sep 2011 09:38:59 -0000 Received: (qmail 30011 invoked by uid 22791); 29 Sep 2011 09:38:58 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Sep 2011 09:38:44 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LSA00G002I15U00@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Thu, 29 Sep 2011 12:38:04 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.8.215]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LSA00FWQ2RFX7B0@a-mtaout21.012.net.il>; Thu, 29 Sep 2011 12:38:04 +0300 (IDT) Date: Thu, 29 Sep 2011 09:48:00 -0000 From: Eli Zaretskii Subject: Re: [RFC] Crash sourcing Python script on Windows In-reply-to: To: Kai Tietz Cc: brobecker@adacore.com, maillist-gdbpatches@barfooze.de, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83r52zelj5.fsf@gnu.org> References: <1317251996-12146-1-git-send-email-brobecker@adacore.com> <09787EF419216C41A903FD14EE5506DD03098D555B@AUSX7MCPC103.AMER.DELL.COM> <4E83D440.6000702@barfooze.de> <20110929040634.GD19246@adacore.com> <83ty7verow.fsf@gnu.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-09/txt/msg00512.txt.bz2 > Date: Thu, 29 Sep 2011 10:38:51 +0200 > From: Kai Tietz > Cc: Joel Brobecker , maillist-gdbpatches@barfooze.de, > gdb-patches@sourceware.org > > The issue here is not the definition of the FILE type itself in this > case. The problem is that python (if built with VC) uses different > runtime-version (msvcr100.dll or lower), but mingw uses by well know > reasons the msvcrt.dll. So by loading this python-DLL into a > mingw-built executable, we have two different runtimes at the same > time. Thanks, this makes sense. What are the reasons that we build GDB against msvcrt.dll? > By the way, the same issue can lead also for different C-runtime > functions pretty funny results. Exactly. If we have such an incompatibility once python's DLL is loaded, it can lead to similar crashes elsewhere. So, unless we can find a way of linking against msvcrNNN.dll or build our own Python with MinGW, it sounds like using Python on Windows is unsafe?