Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1je39j-000139-Lc for pgsql-bugs@arkaria.postgresql.org; Wed, 27 May 2020 21:00:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1je39i-0004jD-Ax for pgsql-bugs@arkaria.postgresql.org; Wed, 27 May 2020 21:00:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1je39i-0004j6-25 for pgsql-bugs@lists.postgresql.org; Wed, 27 May 2020 21:00:06 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1je39g-0000QO-2K for pgsql-bugs@lists.postgresql.org; Wed, 27 May 2020 21:00:05 +0000 Received: by mail-lj1-x235.google.com with SMTP id c11so28536472ljn.2 for ; Wed, 27 May 2020 14:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=P65rEc1N5WCHpBfDwYzHvjXSkuCpMtcs82Hmcz2m6RA=; b=CIUBXDlOz85M8XRXPc82J+ymTOufsVvrC/a2sUacurctJhdnZzFUlAsKjDZLapJM5T dKRt6kcELPMRo+h8n6JVMbYHkTMpdsQHfV7i/V0fmPdi8itziN9uM87rRMWlbv5gq4C6 Vzq6jHhjhv8CdDEgicCR+5Gfm2ubs9vo+sscnacZmDrooYXbHI8oqaMobLUptEqNOlqA BGoLY+nfqwZvA0HlWyS6GschOsbuNEGc4DIY1dYh2iNtjETePpH0gWEqHmz63tf17wHY 2E+BWEgKaSXrQ7IcDfA++TdR6tW/MuM9QTLfLE6JEVhg3NISWCnZsD+j7S+XAPAQRQDf 1LtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=P65rEc1N5WCHpBfDwYzHvjXSkuCpMtcs82Hmcz2m6RA=; b=of3VobfhmZ/HNcnyg2QzZGj45/E9A37J2f4Gl5YapziLl7qVEFSDHAi7BwTRuRjzIc jW1KUYTuBxi4M4lzD8uDMhfaijGrqUPRwOhQ4CftQBIczppJFSELGBlmeimgbB8N3/QR 7tyM4Gq65Q02+AeVxHtF6KIw2EzwFeyTg+o8XAtI190DWN7u/xxy+Y/TDHHrIEDkSArq whQla/QA8c6Byf7L7kVX5AEKu/Nl7GbSazRpe6hZlhnBK9wC9eLm2sH4CuKOiXQKBt/7 lw7ceD1OpZE0oYFIJ2iaSbT7mtSJRUFFeqXRrFj6CAGh1oWtU6Y3O0CmK+53fgU0+G4k 7xwg== X-Gm-Message-State: AOAM53200vHC9zo/aTTde3XR2wgQqdu6GeyiRW3ko+nPYOug8+KupLqL XlJ5hyKPqDGDtFGFMuR3oAHqpNcv X-Google-Smtp-Source: ABdhPJxS1jt+g4idFUx3+GPCI0xyLCVNtiGThE6D5POqOZJ3j0dCPk09WYYMiup41xDx4u8jVg6Pfg== X-Received: by 2002:a2e:880a:: with SMTP id x10mr2371636ljh.448.1590613202895; Wed, 27 May 2020 14:00:02 -0700 (PDT) Received: from [1.0.0.7] ([178.155.6.254]) by smtp.gmail.com with ESMTPSA id y23sm1059234lfg.31.2020.05.27.14.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 May 2020 14:00:01 -0700 (PDT) Subject: Re: BUG #16466: Valgrind detects an invalid read in dblink_open() with a cursor inside a transaction To: Joe Conway , pgsql-bugs@lists.postgresql.org References: <16466-09cfa4a5a0e72cce@postgresql.org> <9bd0744f-5f04-c778-c5b3-809efe9c30c7@joeconway.com> From: Alexander Lakhin Message-ID: Date: Thu, 28 May 2020 00:00:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <9bd0744f-5f04-c778-c5b3-809efe9c30c7@joeconway.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: ru-RU List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello Joe, 27.05.2020 22:58, Joe Conway wrote: > Hmmm, looks like a couple of the members of rconn are left uninitialized. > > When dblink_open() is called *without* an outer transaction it handles the > initialization for us, but *with* an outer transaction it does not :-( > > I think the attached fixes it. Yes, your patch makes valgrind silent. Thanks! Best regards, Alexander