Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyHbZ-0007kr-Vn for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Sep 2018 14:19:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fyHbX-0006Jd-Ob for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Sep 2018 14:19:23 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyHbO-0005Sj-1L for pgsql-hackers@lists.postgresql.org; Fri, 07 Sep 2018 14:19:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyHbK-0004No-NS for pgsql-hackers@lists.postgresql.org; Fri, 07 Sep 2018 14:19:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w87EJ6Tv003575; Fri, 7 Sep 2018 10:19:06 -0400 From: Tom Lane To: Peter Eisentraut cc: pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Refactor dlopen() support In-reply-to: <765f9eb2-789c-59b2-c4c3-8ee865038b58@2ndquadrant.com> References: <14508.1536301857@sss.pgh.pa.us> <765f9eb2-789c-59b2-c4c3-8ee865038b58@2ndquadrant.com> Comments: In-reply-to Peter Eisentraut message dated "Fri, 07 Sep 2018 11:47:29 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3573.1536329946.1@sss.pgh.pa.us> Date: Fri, 07 Sep 2018 10:19:06 -0400 Message-ID: <3574.1536329946@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut writes: > On 07/09/2018 08:30, Tom Lane wrote: >> Buildfarm member locust doesn't like this much. I've been able to >> reproduce the problem on an old Mac laptop running the same macOS release, >> viz 10.5.8. (Note that we're not seeing it on earlier or later releases, >> which is odd in itself.) > Nothing should have changed on macOS except that the intermediate > functions pg_dl*() were replaced by direct calls to dl*(). Very strange. Somehow or other, the changes you made in dfmgr.c's #include lines have made it so that find_rendezvous_variable's local "bool found" variable is actually of type _Bool (which is word-wide on these machines). However, hash_search thinks its output variable is of type pointer to "typedef char bool". The proximate cause of the observed failure is that find_rendezvous_variable sees "found" as true when it should not, and thus fails to zero out the variable's value. No time to look further right now, but there's something rotten about the way we're handling bool. regards, tom lane