pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tom Turelinckx <tom@turelinckx.be>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Bus error in formatting.c NUM_numpart_to_char (9.4.12, 9.6.3, sparc)
Date: Thu, 22 Jun 2017 14:51:44 -0400
Message-ID: <9547.1498157504@sss.pgh.pa.us> (raw)
In-Reply-To: <001501d2eb78$e52a8e60$af7fab20$@turelinckx.be>
References: <006b01d2eaa2$d4317be0$7c9473a0$@turelinckx.be>
	<2069.1498062248@sss.pgh.pa.us>
	<000101d2eb5e$60a7ab60$21f70220$@turelinckx.be>
	<24675.1498141318@sss.pgh.pa.us>
	<001501d2eb78$e52a8e60$af7fab20$@turelinckx.be>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

"Tom Turelinckx" <tom@turelinckx.be> writes:
> Tom Lane wrote:
>> Anyway, find those annotation(s) and send us all the text for that area and maybe a few dozen lines on either side.

> Summary for the current issue, against 9.4.12.

Hm.  The code seems about the same except that the compiler has changed
a few register assignments.  In both cases, the crash has to be coming
from the load instruction in line 4419, unless gdb is totally lying to
us about where the crash is.  And that register was loaded up at line
4389:

	.loc 1 4389 0
	ld	[%fp-80], %g3
	ld	[%g3+12], %g2
	...
	.loc 1 4419 0
	ld	[%g3+8], %g2
	cmp	%g2, -1

(The "patched" code uses %g4 instead, but otherwise is the same.)
Now, the value loaded has to be a valid pointer, because the load
from [%g3+12] didn't crash.  And nothing in the straight-line
code sequence changed %g3.  But we aren't seeing all of the complicated
if-test at line 4413.  It looks to me like the compiler has put some
of it out-of-line, at labels .LL697 and .LL726 (or .LL692 and .LL693
in the "patched" assembly).  I am guessing that some part of those
code sequences must be trashing %g3 before jumping back to this
sequence at .LL553 or .LL715.

Maybe you could extract those bits too?  Or if you prefer, just send me
the whole .s files off-list.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (14+ messages)  latest in thread

Message-ID: <9547.1498157504@sss.pgh.pa.us>
Permalink:  ../9547.1498157504@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9547.1498157504@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tom@turelinckx.be
  Subject: Re: Bus error in formatting.c NUM_numpart_to_char (9.4.12, 9.6.3, sparc)
  In-Reply-To: <9547.1498157504@sss.pgh.pa.us>
  References: <006b01d2eaa2$d4317be0$7c9473a0$@turelinckx.be> <2069.1498062248@sss.pgh.pa.us> <000101d2eb5e$60a7ab60$21f70220$@turelinckx.be> <24675.1498141318@sss.pgh.pa.us> <001501d2eb78$e52a8e60$af7fab20$@turelinckx.be> <9547.1498157504@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox