cloudberry icon indicating copy to clipboard operation
cloudberry copied to clipboard

Fix: tde encrypt buffer context don't use share memory

Open kongfanshen-0801 opened this issue 2 months ago • 0 comments

Now we Fix: tde encrypt buffer context don't use share memory

We did not calculate the size of shared memory for BufEncCtx and BufDecCtx in the CreateSharedMemoryAndMemories function, which is a potential issue. There is actually no need to use shared memory here, as the parent process does not read the values of BufEncCtx and BufDecCtx. When we use AES algorithm the BufEncCtx and BufDecCtx also does not use shared memory. In order to maintain a consistent code style,we use malloc. cann't use palloc to apply for memory here, as TopmemoryContext is NULL during initialization and the memoryContext has not been setted yet.

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • [x] Bug fix (non-breaking change)
  • [ ] New feature (non-breaking change)
  • [ ] Breaking change (fix or feature with breaking changes)
  • [ ] Documentation update

Breaking Changes

Test Plan

  • [ ] Unit tests added/updated
  • [ ] Integration tests added/updated
  • [ ] Passed make installcheck
  • [ ] Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


kongfanshen-0801 avatar Oct 31 '25 08:10 kongfanshen-0801