From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21699 invoked by alias); 23 Jan 2012 22:47:27 -0000 Received: (qmail 21691 invoked by uid 22791); 23 Jan 2012 22:47:26 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,TW_FD,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Jan 2012 22:47:13 +0000 Received: by vbbfd1 with SMTP id fd1so1170580vbb.0 for ; Mon, 23 Jan 2012 14:47:12 -0800 (PST) Received: by 10.52.95.74 with SMTP id di10mr4923184vdb.46.1327358832595; Mon, 23 Jan 2012 14:47:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.95.74 with SMTP id di10mr4923177vdb.46.1327358832504; Mon, 23 Jan 2012 14:47:12 -0800 (PST) Received: by 10.220.229.1 with HTTP; Mon, 23 Jan 2012 14:47:12 -0800 (PST) In-Reply-To: <20120123221706.GA21051@host2.jankratochvil.net> References: <1317251996-12146-1-git-send-email-brobecker@adacore.com> <20120123181125.GA26683@host2.jankratochvil.net> <4F1DA92A.4020207@redhat.com> <20120123210850.GA28792@host2.jankratochvil.net> <20120123221706.GA21051@host2.jankratochvil.net> Date: Mon, 23 Jan 2012 23:47:00 -0000 Message-ID: Subject: Re: [patch] Do not open Python scripts twice #2 [Re: [RFC] Crash sourcing Python script on Windows] From: Doug Evans To: Jan Kratochvil Cc: Pedro Alves , Joel Brobecker , gdb-patches@sourceware.org X-System-Of-Record: true X-Gm-Message-State: ALoCoQmfXGVZ3YpYcymrBTd10NFIOFLV+5zNBg7S7wWOjPJSqdHDrM3RZkggwJ+1MKbjHPa7FsUJvaSrR4hd0IlFq1k5fsccnY+XsYVnrXpANBfRgksgqCMKJlxiDkjfA/Gq+5zTaEsRq1/VrCojEhL8HgteMmqbag== Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2012-01/txt/msg00799.txt.bz2 On Mon, Jan 23, 2012 at 2:17 PM, Jan Kratochvil wrote: > Hello Doug, > > On Mon, 23 Jan 2012 22:59:58 +0100, Doug Evans wrote: >> Do you have any data that shows there is a problem with the double openi= ng? > > Native GNU/Linux application would never double open files. I dunno about "never", but I understand the gist of the point. > It is the similar reason I disable GDB directories relocation in Fedora -= as > it is not a normal native application behavior - and in some corner cases= it > even breaks execution. Huh. Can you elaborate? > GDB is still a bit exotic codebase nowadays, there is a long way to make = it > a normal application with codebase for easy contributions: > =A0 =A0 =A0 =A0http://sourceware.org/gdb/wiki/ProjectIdeas > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Here are some specific internal cleanups t= hat are worth doing: I don't understand how this is dispositive to this thread. >> [I'm kinda uncomfortable with this patch, as is.] > > I am uncomfortable with code opening file by filename I have already an o= pened > FILE * for, that is IMNSHO a clear bug. > > But sure if there is consensus it cannot be fixed in FSF GDB I can move t= he > fix to Fedora GDB, there is now already ~50 to-be-merged patches. Only 50? It's getting better then. 1/2 :-) btw, my main concern is the nature of the test on windows, and hoping there is a better way to do this. For reference sake, and I don't know if/when we'll switch to 3.x, or support 2.x and 3.x, but Python 3.x uses fds not FILE*s. [PyFile_FromFile is gone, and 3.x has PyFile_FromFd]