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 1kLHZD-0002XR-TM for pgsql-odbc@arkaria.postgresql.org; Thu, 24 Sep 2020 03:05: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 1kLHZB-0004kh-6L for pgsql-odbc@arkaria.postgresql.org; Thu, 24 Sep 2020 03:05:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLHZA-0004ka-Q9 for pgsql-odbc@lists.postgresql.org; Thu, 24 Sep 2020 03:05:04 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kLHZ8-0006yZ-I2 for pgsql-odbc@postgresql.org; Thu, 24 Sep 2020 03:05:03 +0000 Received: by mail-pf1-x443.google.com with SMTP id d6so977540pfn.9 for ; Wed, 23 Sep 2020 20:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=D6b7rpdd0AXkSTxfc/QOv+H/C/jghLMtWPuL1MreTaE=; b=JA0ATHiIrr99Y33HMsUJkT+Ksw7wEYmJwwxJCVF/rbAIYVNB7xiMjcdNO8z+DlKTDq DxyRHO8Qp30jgCWNmZpuJVd1DUTyAqYuSXy/FioY3pBg3aPv0Bb8V2lKzd+zxK/GdPw2 AVH1KzpbBO40oh28C5z+rV5+M4BS4l8Sm9hcLjTogYYpxQR6tBwFWw0ULKi8XAvUxsjs xIKZt8cBCkJltCdrbBYccpZapD7OAeeHHGyl5SSaTzJ7fm4hep8My/AeEN2gIADymqAv U/ZPm/kTnBuKR3AzfEnfZap69FcN5FIKOEIfOusEDy0Rk/rQPgvDqf3QTh2z8E3AzZ3k WBoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=D6b7rpdd0AXkSTxfc/QOv+H/C/jghLMtWPuL1MreTaE=; b=t8VBT9aGf2x6sXinPuWI+xCrmB0kvlapflhDYZ+E5ICP6MZ8gxs88Ri5taNN4L8Al8 AjDtu1SHEEQw7aChNIRhJAROBPh9GGTHYi8HkcrPwbm56Vhl8KAHkwx1/VK5Kso/Us7Y mt6emSf2xe8JKCW6hMIG7m023zsp4JJsFE0J9eupO8x8ETtLiinBnm9lSysKUASrjdmu AVJi+/bPWTjeOFQOk78T0OO3xYP77MxPri22fvclOIiaZGRgUJv00VbA0JsIyEtdXZce AX8D8MawXVRXwAszlP6FpltYOcef4lvArQXAYZPyevFdL+lbvBiTEsZ3irf9q4cb3IpV bXRg== X-Gm-Message-State: AOAM53265qzl1eDqs307WuMiI96ooyC9fpJthl0lG4AYv2+G4ZwODKoY q7fgZj/RDFS2SWpdm9AXt1BN+ny4n4mjjA== X-Google-Smtp-Source: ABdhPJwtwQpA1nYFq/P4TAKtw0kPoCmvPxkXbg87rllBt/AbJ69u6CoUA0BQaNwrKrosbs2pmxcoaw== X-Received: by 2002:a62:b614:0:b029:142:2501:396c with SMTP id j20-20020a62b6140000b02901422501396cmr2552348pff.49.1600916700897; Wed, 23 Sep 2020 20:05:00 -0700 (PDT) Received: from ?IPv6:2400:4153:ea01:1f00:7837:f695:2060:fc37? ([2400:4153:ea01:1f00:7837:f695:2060:fc37]) by smtp.gmail.com with ESMTPSA id f10sm912066pfk.195.2020.09.23.20.04.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Sep 2020 20:05:00 -0700 (PDT) Subject: Re: Crashing with copy_and_convert_field To: Henrik Krohns Cc: pgsql-odbc@postgresql.org References: <20200824144131.GA32577@hege.li> <20200901043648.GA2161@hege.li> <20200920080114.GA9518@hege.li> <20200922080031.GA32213@hege.li> <20200923125835.GA18117@hege.li> From: "Inoue,Hiroshi" Message-ID: <4b53403a-7562-5f75-0c96-3ffa49cc1fc2@gmail.com> Date: Thu, 24 Sep 2020 12:04:58 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200923125835.GA18117@hege.li> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Henrik, On 2020/09/23 21:58, Henrik Krohns wrote: > On Wed, Sep 23, 2020 at 07:59:55PM +0900, Inoue,Hiroshi wrote: >> Hi Henrik, >> >> On 2020/09/22 17:00, Henrik Krohns wrote: >>> Compiled fresh stack with unixODBC 2.3.9 / libpq 12.4 / psqlodbc git, with >>> debugging info. >>> >>> Actually I can reproduce this with simple isql help command, forget the >>> previous Oracle stuff. I guess it's related to Solaris 11 somehow, I've >>> tried both Solaris Studio 12.6 and GCC 9.3 for compiling. Maybe I'll try >>> compiling later on Linux if it's the same. >> Could you show me config.h and config.log? > Now that you mentioned.. I found the problem! > > Looking at config.log, there's many of these > > configure:12913: checking size of void * > configure:12918: gcc -m64 -o conftest -g -O0 -I/opt/unixODBC/include -I/opt/unixODBC/include -I/opt/unixODBC/include/postgresql/internal -L/opt/unixODBC/lib -L/opt/unixODBC/lib conftest.c -lpq -lpthread -lodbcinst >&5 > configure:12918: $? = 0 > configure:12918: ./conftest > ld.so.1: conftest: fatal: libpq.so.5: open failed: No such file or directory > ./configure[1703]: eval: line 1: 7319: Killed > configure:12918: $? = 265 > configure: program exited with status 265 > > I fixed this by adding LDFLAGS="-R/opt/unixODBC/lib" (where my libpq resides too) > > Now all SIZEOF_ are correctly defined in config.h and isql doesn't crash > anymore. :-) > > > --- config.h.old 2020-09-22 10:43:01.000000000 +0300 > +++ config.h 2020-09-23 15:49:29.384805935 +0300 > @@ -127,13 +127,13 @@ > #define POSIX_MULTITHREAD_SUPPORT 1 > > /* The size of `long', as computed by sizeof. */ > -#define SIZEOF_LONG 0 > +#define SIZEOF_LONG 8 > > /* The size of `long int', as computed by sizeof. */ > -#define SIZEOF_LONG_INT 0 > +#define SIZEOF_LONG_INT 8 > > /* The size of `void *', as computed by sizeof. */ > -#define SIZEOF_VOID_P 0 > +#define SIZEOF_VOID_P 8 > > /* Define to 1 if SQLColAttribute use SQLLEN */ > #define SQLCOLATTRIBUTE_SQLLEN 1 > > > Thanks for nudging me in right direction. I would have assumed configure > dying and printing error in such scenario, perhaps something to improve > there? I would try to improve configure script today. Could you please try the script without LDFLAGS="-R/opt/unixODBC/lib"? regards, Hiroshi Inoue > > Cheers, > Henrik > >