Skip to content
Snippets Groups Projects
Commit f8af1272 authored by Aleksandr Lyapunov's avatar Aleksandr Lyapunov Committed by Aleksandr Lyapunov
Browse files

memtx: fix size calculation in functional index chunks

When function of a functional index is called, the result is
stored in memtx allocator chunks among data tuples. By design,
memtx allocator requires size of allocation for deallocation,
so the size has to be stored along with the data (actually right
before it). By a mistake, when being deleted, the size of data
was retrieved slightly wrong, giving the value of 4 bytes less.
Due to the allocator specific design the size error leads to a
rare crashes when the size of functional index function result
was about 160 bytes (157..160 bytes with default config). It
seems that sizes about 320 etc are affected to.

Fix it by correct size evaluation of functional index chunks.

Hotfix of #6786

NO_DOC=bug fix
NO_TEST=see later commits
parent aec491cd
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment