AddressSanitizer: stack-use-after-scope on address in CreateBackgroundJob

pull/7949/head
Maksim Melnikov 2025-04-03 16:13:26 +03:00
parent a7e686c106
commit 34fde7b6d9
1 changed files with 2 additions and 1 deletions

View File

@ -3006,6 +3006,8 @@ CreateBackgroundJob(const char *jobType, const char *description)
/* insert new job */
Datum values[Natts_pg_dist_background_job] = { 0 };
bool isnull[Natts_pg_dist_background_job] = { 0 };
NameData jobTypeName = { 0 };
memset(isnull, true, sizeof(isnull));
int64 jobId = GetNextBackgroundJobsJobId();
@ -3018,7 +3020,6 @@ CreateBackgroundJob(const char *jobType, const char *description)
if (jobType)
{
NameData jobTypeName = { 0 };
namestrcpy(&jobTypeName, jobType);
InitFieldValue(Anum_pg_dist_background_job_job_type, values, isnull,
NameGetDatum(&jobTypeName));