Re: A qsort template - Mailing list pgsql-hackers

From John Naylor
Subject Re: A qsort template
Date
Msg-id CAFBsxsF1TeK5Fic0M+TSJXzbKsY6aBqJGNj6ptURuB09ZF6k_w@mail.gmail.com
Whole thread Raw
In response to Re: A qsort template  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
On Sat, Apr 2, 2022 at 5:27 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> It looks like UBsan sees a problem, per BF animal kestrel:
>
> /mnt/resource/bf/build/kestrel/HEAD/pgsql.build/../pgsql/src/backend/utils/sort/tuplesort.c:722:51:
> runtime error: load of value 96, which is not a valid value for type
> 'bool'

Yeah, same with tamandua. Then, skink (a Valgrind animal) shows:

==1940791== VALGRINDERROR-BEGIN
==1940791== Conditional jump or move depends on uninitialised value(s)
==1940791==    at 0x73D394: ApplyInt32SortComparator (sortsupport.h:311)
==1940791==    by 0x73D394: qsort_tuple_int32_compare (tuplesort.c:722)
==1940791==    by 0x73D394: qsort_tuple_int32 (sort_template.h:313)
==1940791==    by 0x7409BC: tuplesort_sort_memtuples (tuplesort.c:3613)
==1940791==    by 0x742806: tuplesort_performsort (tuplesort.c:2154)
==1940791==    by 0x23C109: heapam_relation_copy_for_cluster
(heapam_handler.c:955)
==1940791==    by 0x35799A: table_relation_copy_for_cluster (tableam.h:1658)
==1940791==    by 0x35799A: copy_table_data (cluster.c:913)
==1940791==    by 0x359016: rebuild_relation (cluster.c:606)
==1940791==    by 0x35914E: cluster_rel (cluster.c:427)
==1940791==    by 0x3594EB: cluster (cluster.c:195)
==1940791==    by 0x5C73FF: standard_ProcessUtility (utility.c:862)
==1940791==    by 0x5C78D0: ProcessUtility (utility.c:530)
==1940791==    by 0x5C4C7B: PortalRunUtility (pquery.c:1158)
==1940791==    by 0x5C4F78: PortalRunMulti (pquery.c:1315)
==1940791==  Uninitialised value was created by a stack allocation
==1940791==    at 0x74224E: tuplesort_putheaptuple (tuplesort.c:1800)

-- 
John Naylor
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: logical decoding and replication of sequences
Next
From: Julien Rouhaud
Date:
Subject: Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements