Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDtPw-00065I-R8 for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Apr 2019 16:16:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hDtPv-0008HD-2c for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Apr 2019 16:16:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDtPu-0008H6-QN for pgsql-hackers@lists.postgresql.org; Tue, 09 Apr 2019 16:16:10 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDtPr-0007cK-SZ for pgsql-hackers@postgresql.org; Tue, 09 Apr 2019 16:16:10 +0000 Received: by mail-wm1-x343.google.com with SMTP id y197so4045289wmd.0 for ; Tue, 09 Apr 2019 09:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ESMvq5mW3J23TodVm4csFfqA7L0Bam6X6/87V0iGlPM=; b=xVydkR/g92Q+nTxxPmKaz8yYW9BZowOeyvLh+stirBv46mPHkcLp2m5H3u7KxnoU2d UpVdEyHRxZ1U8yDkL4Kkr4gNwCSqCR3D9SppS77kFEUup+AFERc4iFo5nGXY7Rq2TTTS /KRhZFJG1X9rNOTLBPIKy6W8/MZ0NsiPFuPLpmyPgE+Hz/8WhxxX+js10KeLuXLeZt9m hV9wlSo6FGMC7+1iPFx2KP7I2K/GcI3wAVhXDZ7eSBdssJHEADCYeSC+/H21O2sVgmV7 fsi05Emi630+38KM05C8C9ByNjDaELXWj04Y7c1P8ustggKVgLBs/eR2ic79o6wgQMIx 3wmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ESMvq5mW3J23TodVm4csFfqA7L0Bam6X6/87V0iGlPM=; b=mUHwszIEHzmKCC+vU50qDuA3ND3MSwKOCp/7VP2861hhtwrQooPMzO9jASgWY2k7Zn t0SvmNKQ0O/my0fHZIJy1YKXUfqy3JO68qVRyp4jdFm8bJ3F8xp5OfHg/9irPijSYtkY G8hvyWrlcEStzQT1K1cqQhPQED8n4KcpMKAdGDcz0nf7Cjw4X/moWqsspbg24oFXPjIl d3ncAUoXnu1rBiroe+BUoHNZZonkpsyyZT38tJlf1HFEfRXg+eBh/mHTH7B3xr9HVefi ozHkAd9otPbj+WphmLtEvL7CpWf+04owgsTQyctx2lcaHPefS254nsq/nDWgzO1M32RT OW8Q== X-Gm-Message-State: APjAAAWCXD5rp3cA+Iau7wKf9W6C9MffjbhI5GkcyzKWz4VkT2A2vKGn 6LsUsIeW3jYhltMvGpjhq5N3qw== X-Google-Smtp-Source: APXvYqxnElEKSXKmNp9EnE/2zB+xjIb0Ko4EG9PiVDh+gx7yObHfDGmtILQiY9yFnQvluMqdJ4+oIg== X-Received: by 2002:a7b:c257:: with SMTP id b23mr21629091wmj.83.1554826567224; Tue, 09 Apr 2019 09:16:07 -0700 (PDT) Received: from localhost (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id d17sm43642370wrw.88.2019.04.09.09.15.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 09 Apr 2019 09:15:58 -0700 (PDT) Date: Tue, 9 Apr 2019 18:15:57 +0200 From: Tomas Vondra To: Alexander Korotkov Cc: Tom Lane , Andrew Dunstan , Andres Freund , PostgreSQL Hackers , John Naylor , Jeff Janes , Nikita Glukhov , Oleg Bartunov , Michael Paquier , Stas Kelvich , PostgreSQL-development , Thomas Munro , David Steele , Robert Haas , Pavel Stehule Subject: Re: jsonpath Message-ID: <20190409161557.xwc4xwqeaimxcb4d@development> References: <23e82578-b648-ab57-a4af-791abccff344@2ndQuadrant.com> <4971.1553779874@sss.pgh.pa.us> <5656.1553781027@sss.pgh.pa.us> <19611.1554593792@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716-1444-295967-dirty List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, Apr 07, 2019 at 03:03:58AM +0300, Alexander Korotkov wrote: >On Sun, Apr 7, 2019 at 2:37 AM Tom Lane wrote: >> Alexander Korotkov writes: >> > Thus, contents of unused function makes test fail or pass. So far, it >> > looks like a compiler bug. Any thoughts? >> >> Yeah :-(. The fact that we've not seen a similar failure on any other >> machines points in that direction, too. Maybe it's some other aspect >> of the machine's toolchain, like flex or bison, but that's not that >> much different from our standpoint. >> >> There's a lot of stuff I don't especially like about jsonpath_scan, >> for instance I think the "init" arguments to resizeString etc are >> a pretty error-prone and unmaintainable way to do things. But >> I don't see anything that looks like it'd be a portability hazard >> that would explain this. >> >> I still have a nagging feeling that there's a wild store somewhere >> in here, but I don't know how to find it based on the limited >> evidence we've got. > >Yeah, it might be not because compiler error. It might depend on >memory layout. So existence of extra function changes memory layout >and, in turn, causes an error. I will try to disassemble >jsonpath_scan.o and see whether content of yyparse2 influences >assembly of other functions. > Have you tried other compiler version / different optimization level? Or running it under valgrind. Not sure how difficult that is on Windows. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services