| From: | Jianghua Yang <yjhjstz(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | [PATCH] Use DatumGetUInt32() for dsm_attach() in test_shm_mq_main() |
| Date: | 2025-06-26 19:51:10 |
| Message-ID: | CAAZLFmRxkUD5jRs0W3K=Ue4_ZS+RcAb0PCE1S0vVJBn3sWH2UQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
The attached patch fixes a minor type mismatch in `test_shm_mq_main()`.
The argument passed to `dsm_attach()` is expected to be a `uint32`, but the
code currently uses `DatumGetInt32()` to extract it from the `Datum`
argument. This can lead to incorrect behavior when the high bit is set, as
'unable to map dynamic shared memory segment'.
This patch changes it to use `DatumGetUInt32()` to match the expected type
and ensure correctness.
Thanks,
Jianghua Yang
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Fix-type-mismatch-in-dsm_attach-argument-by-using-Da.patch | application/octet-stream | 1.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Melanie Plageman | 2025-06-26 19:56:07 | Re: Fix some inconsistencies with open-coded visibilitymap_set() callers |
| Previous Message | Melanie Plageman | 2025-06-26 19:12:27 | Re: Remove unneeded check for XLH_INSERT_ALL_FROZEN in heap_xlog_insert |