Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aaEZB-0007mv-Ey for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Feb 2016 03:32:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aaEZA-0004Nn-Ji for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Feb 2016 03:32:12 +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.84) (envelope-from ) id 1aaEYX-0003gE-KW for pgsql-bugs@postgresql.org; Mon, 29 Feb 2016 03:31:33 +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.84) (envelope-from ) id 1aaEYV-0002pR-15 for pgsql-bugs@postgresql.org; Mon, 29 Feb 2016 03:31:32 +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 u1T3VRXb020895; Sun, 28 Feb 2016 22:31:27 -0500 From: Tom Lane To: Thom Brown cc: pgsql-bugs Subject: Re: Server crash with certain encodings In-reply-to: References: Comments: In-reply-to Thom Brown message dated "Mon, 29 Feb 2016 02:15:54 +0000" Date: Sun, 28 Feb 2016 22:31:27 -0500 Message-ID: <20894.1456716687@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Thom Brown writes: > I can crash the server in 9.4, 9.5 and 9.6 when doing the following on > Linux: Hm, would you confirm that you get a stack trace like this: #0 0x000000397ee32625 in raise () from /lib64/libc.so.6 #1 0x000000397ee33e05 in abort () from /lib64/libc.so.6 #2 0x000000397ee70537 in __libc_message () from /lib64/libc.so.6 #3 0x000000397ee75f4e in malloc_printerr () from /lib64/libc.so.6 #4 0x000000397ee78cad in _int_free () from /lib64/libc.so.6 #5 0x000000000076ce70 in free_struct_lconv () at pg_locale.c:394 #6 PGLC_localeconv () at pg_locale.c:460 #7 0x0000000000717cd5 in cash_in (fcinfo=) at cash.c:112 Looks like we're getting confused about allocation/freeing of lconv data --- I've not dug into it more closely than to reproduce the crash. Aside from that, though, it's not really clear to me that it's sensible to allow an lc_monetary (or lc_anything) setting that specifies an encoding different from the database encoding. Should your example have failed at the SET lc_monetary step? If not, what would you expect that to mean? 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