Bug #93173 Valgrind: misused UNIV_MEM_ALLOC after ut_zalloc_nokey
Submitted: 13 Nov 2018 13:25 Modified: 14 Nov 2018 6:38
Reporter: Przemysław Skibiński (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S7 (Test Cases)
Version:8.0.13, 5.7.24 OS:Any
Assigned to: CPU Architecture:Any
Tags: valgrind

[13 Nov 2018 13:25] Przemysław Skibiński
Description:
There is wrongly used UNIV_MEM_ALLOC (equals to VALGRIND_MAKE_MEM_UNDEFINED) after memory block was zeroed with ut_zalloc_nokey() in 5.7.24:
https://github.com/mysql/mysql-server/blob/5.7/storage/innobase/include/buf0buf.ic#L773

and 8.0.13:
https://github.com/mysql/mysql-server/blob/8.0/storage/innobase/include/buf0buf.ic#L722

How to repeat:
ut_malloc() was replaced with ut_zalloc() with the following commit:
https://github.com/mysql/mysql-server/commit/7f301a8700cbe36ce65e83419dd8cea7fabc5eca
and UNIV_MEM_ALLOC should also be removed.

Suggested fix:
UNIV_MEM_ALLOC should be removed
[14 Nov 2018 6:38] MySQL Verification Team
Hello Przemysław,

Thank you for the report!

regards,
Umesh