X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AAACA3842407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1596021747; bh=8OL/Y87c793IB2rhWdx+KPPO7w2OBe7qlWEF1ihSjLo=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=vicoxt0mScvgi3KSABCOH149TkAWvNptsIFYDmpZrct++59kSd3O/8Hh6xgF5Alsw 2fNlAE8Ts79vGW4z234j1hdd+kFQrP5f5YoKOkymmh/PVv8O6RPuXQa7N2SCPKo7bk 9T8ftXwZ6jQQcECCHzJYHAow92i7eSDUyuo98Oek= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6445D386F474 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=vJakGYZLDN3KiVkdYF1juXr4CCuL5mfLiynW4HO9+HY=; b=FPrb5ZeTFYQxqkRaBTN/jdW67qFcQ/5dAp2272vVcHOaGeYUt+EYgquVxtcFF7ZbqL oVkcDYpyfRtbZxc379QV7EQCPdc95vW8C2hAatWAxTlFWdByTUPOfXJWPzEkdksE5j08 9QoJhyHxH5z4sM9BjNrr7AgBePdJBCajFX65IRSpOXr0GToC3CF/MQhp3RdtB4lY6iBK c0Gc16xfMcWmtAPQEBu0DccROadqUdo5UsG2C50h0EdeyNoZNsHIhQYC8M41M0EUn9TA oJol9Jfi4CU/lYf1fDyn9rAmYCKRfcDX76oFjrUFLPe7RgOsfrhlG34ps2aYeg3JZMUK N6Mg== X-Gm-Message-State: AOAM532TK+QTmOk1IJF7ZAoXGMBqW38H2aEgiynp+zED85OIS4sO2LBQ zSx0lEsaFBpdT2P5Q+Di/l1fxMOiilX2m2GsZPftcev2CnUR2Q== X-Google-Smtp-Source: ABdhPJwCV9GnSLGlMl6QCqHpt6Z/QlUn9UvCu1P9n0iAPczVU+XYCC4eD77bOA3iVPZuOZiq7z6Xv+Jz9j671DJtri4= X-Received: by 2002:a05:6602:2c01:: with SMTP id w1mr33897463iov.130.1596021743327; Wed, 29 Jul 2020 04:22:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 29 Jul 2020 13:22:10 +0200 Message-ID: Subject: Re: Cygwin's sqlite3 modifies DLL search order To: cygwin AT cygwin DOT com X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: "E. Madison Bray via Cygwin" Reply-To: "E. Madison Bray" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" (Oops, resending this upon realizing I didn't reply to the list) On Fri, Jul 17, 2020, 09:34 Jan Nijtmans wrote: > > Op do 16 jul. 2020 om 18:48 schreef E. Madison Bray via Cygwin: > > > > Hi all, > > > > After some significant headache I discovered a problem introduced by > > the Cygwin patches for sqlite3. The effect of this patch is that it > > modifies the DLL search order for all subsequent DLL loads (by > > filename instead of absolute path) in the application. > > Thanks for bringing this to my attention. I'm open to suggestions how > to fix this. Yes, this code is already in for a long time. It even contains > an experimental part (the part within #ifdef _WIN32), when I was > trying to make a Win32 build of SQLite work in a Cygwin environment, > oviously a bad idea ...... > > Thinking about it, I have an idea how to fix it: Currently extensions > (when using the win32 vfs) are loaded using the Win32 function > LoadLibrary(). Changing that to use dlopen() might already have > the desired effect, then this section can simply be removed > completely. > > Thanks! > Jan Nijtmans Hi Jan, Thanks for commenting on this, and thank you for all the work you've done maintaining this port! Yes, the original patch you came up with made sense to me so I was still a little confused by why the SetDllDirectory stuff was added. But I'm sure it fixed something at the time. As long as we're patching it for Cygwin anyways I think your idea to use dlopen() makes sense. Cygwin's dlopen should do all the path management properly anyways :) -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple