[PATCH] Silence Valgrind about SelectConfigFiles()

From: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: [PATCH] Silence Valgrind about SelectConfigFiles()
Date: 2025-08-13 23:04:18
Message-ID: CAJ7c6TMByXE8dc7zDvDWTQjk6o-XXAdRg_RAg5CBaUOgFPV3LQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I experimented with Valgrind after recent changes committed by Tom [1]
and catched this:

```
25 bytes in 1 blocks are definitely lost in loss record 18 of 49
at 0x4846828: malloc (in
/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x57DE35E: strdup (strdup.c:42)
by 0x9D9D1D: make_absolute_path (path.c:877)
by 0x98AD5D: SelectConfigFiles (guc.c:1795)
by 0x65F104: PostmasterMain (postmaster.c:785)
by 0x52F2B9: main (main.c:231)
```

I propose to correct this as attached.

[1]: https://postgr.es/m/285483.1746756246@sss.pgh.pa.us

Attachment Content-Type Size
v1-0001-Fix-memory-leaks-in-SelectConfigFiles.patch text/x-patch 2.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-08-13 23:11:07 Re: index prefetching
Previous Message Rahila Syed 2025-08-13 22:35:59 Re: Enhancing Memory Context Statistics Reporting