Re: BUG #15910: Valgrind-detected error in DecodeTimeOnly

Alexander Law <exclusion@gmail.com>

From: Alexander Lakhin <exclusion@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Date: 2019-07-16T16:24:56Z
Lists: pgsql-bugs

Attachments

> Bug reference:      15910
> Logged by:          Alexander Lakhin
> Email address:      exclusion@gmail.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
The attached patch fixes this issue.

Best regards,
Alexander

Commits

  1. Fix some incorrect parsing of time with time zone strings