BUG #15910: Valgrind-detected error in DecodeTimeOnly

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: exclusion(at)gmail(dot)com
Subject: BUG #15910: Valgrind-detected error in DecodeTimeOnly
Date: 2019-07-16 16:19:49
Message-ID: 15910-2eba5106b9aa0c61@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15910
Logged by: Alexander Lakhin
Email address: exclusion(at)gmail(dot)com
PostgreSQL version: 12beta2
Operating system: Ubuntu 18.04
Description:

When executing the following query:
SELECT time with time zone '04:05:06 m2';
I get a strange result:
timetz
-------------------
04:05:06+02:30:17
and the valgrind errors:
==00:00:00:07.177 31724== Conditional jump or move depends on uninitialised
value(s)
==00:00:00:07.177 31724== at 0x57333D: DetermineTimeZoneOffsetInternal
(datetime.c:1485)
==00:00:00:07.177 31724== by 0x573DA6: DetermineTimeZoneOffset
(datetime.c:1445)
==00:00:00:07.177 31724== by 0x575FEE: DecodeTimeOnly (datetime.c:2317)
==00:00:00:07.177 31724== by 0x570D6B: timetz_in (date.c:1994)
==00:00:00:07.177 31724== by 0x67356B: InputFunctionCall (fmgr.c:1548)
==00:00:00:07.177 31724== by 0x67378C: OidInputFunctionCall
(fmgr.c:1651)
==00:00:00:07.177 31724== by 0x30C312: stringTypeDatum
(parse_type.c:641)
==00:00:00:07.177 31724== by 0x2F282F: coerce_type (parse_coerce.c:304)
==00:00:00:07.177 31724== by 0x2F1B15: coerce_to_target_type
(parse_coerce.c:103)
==00:00:00:07.177 31724== by 0x2F8E4A: transformTypeCast
(parse_expr.c:2813)
==00:00:00:07.177 31724== by 0x2F83F8: transformExprRecurse
(parse_expr.c:202)
==00:00:00:07.177 31724== by 0x2F807F: transformExpr (parse_expr.c:155)
==00:00:00:07.177 31724== Uninitialised value was created by a stack
allocation
==00:00:00:07.177 31724== at 0x570C8E: timetz_in (date.c:1972)
==00:00:00:07.177 31724==
...
==00:00:00:07.179 31724== Conditional jump or move depends on uninitialised
value(s)
==00:00:00:07.179 31724== at 0x6B2165: pg_next_dst_boundary
(localtime.c:1698)
==00:00:00:07.179 31724== by 0x573447: DetermineTimeZoneOffsetInternal
(datetime.c:1508)
==00:00:00:07.179 31724== by 0x573DA6: DetermineTimeZoneOffset
(datetime.c:1445)
==00:00:00:07.179 31724== by 0x575FEE: DecodeTimeOnly (datetime.c:2317)
==00:00:00:07.179 31724== by 0x570D6B: timetz_in (date.c:1994)
==00:00:00:07.179 31724== by 0x67356B: InputFunctionCall (fmgr.c:1548)
==00:00:00:07.179 31724== by 0x67378C: OidInputFunctionCall
(fmgr.c:1651)
==00:00:00:07.179 31724== by 0x30C312: stringTypeDatum
(parse_type.c:641)
==00:00:00:07.179 31724== by 0x2F282F: coerce_type (parse_coerce.c:304)
==00:00:00:07.179 31724== by 0x2F1B15: coerce_to_target_type
(parse_coerce.c:103)
==00:00:00:07.179 31724== by 0x2F8E4A: transformTypeCast
(parse_expr.c:2813)
==00:00:00:07.179 31724== by 0x2F83F8: transformExprRecurse
(parse_expr.c:202)
==00:00:00:07.180 31724== Uninitialised value was created by a stack
allocation
==00:00:00:07.180 31724== at 0x570C8E: timetz_in (date.c:1972)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2019-07-16 16:23:29 BUG #15911: Why no Bcrypt in pg_hba.conf?
Previous Message PG Bug reporting form 2019-07-16 16:10:52 BUG #15909: Doc for `initdb` on `--data-checksums` says "cannot be changed later", but *can* be in Pg 12.