The code is attempting the following:
1) Attempt db3cget() with a NULL pointer that returns "rc -30999" but fills in the size of the blob that needs to be returned.
2) A "anonymous memory" allocation using mmap is allocated.
3) Attempt db3cpget() to retrieve (secondary -> primary) blob.
4) The blob memory is set to PROT_READ.
The DB_SET successful access is claiming a size of 9620 and db3cpget returns same size.
The 1st DB_NEXTDUP success is claiming 22812b are needed but returning 6784b.
The 2nd DB_NEXTDUP failure is claiming 6392b are needed (which is smaller than 6784b).
The testable hypothesis is DB_NEXTDUP isn't filling in the needed blob size correctly in db-5.3.15. Time to tinker.
The code is attempting the following:
1) Attempt db3cget() with a NULL pointer that returns "rc -30999" but
fills in the size of the blob that needs to be returned.
2) A "anonymous memory" allocation using mmap is allocated.
3) Attempt db3cpget() to retrieve (secondary -> primary) blob.
4) The blob memory is set to PROT_READ.
The DB_SET successful access is claiming a size of 9620 and db3cpget returns same size.
The 1st DB_NEXTDUP success is claiming 22812b are needed but returning 6784b.
The 2nd DB_NEXTDUP failure is claiming 6392b are needed (which is smaller than 6784b).
The testable hypothesis is
DB_NEXTDUP isn't filling in the needed blob size correctly in db-5.3.15.
Time to tinker.