Skip to content

Commit d2ad828

Browse files
author
acurtis/[email protected]/ltamd64.xiphis.org
committed
backport valgrind cleanups from 6.0-engines
1 parent f6c3587 commit d2ad828

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

mysql-test/valgrind.supp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,3 +495,16 @@
495495
fun:_db_enter_
496496
fun:kill_server
497497
}
498+
499+
#
500+
# Warning caused by small memory leak in threaded dlopen
501+
#
502+
503+
{
504+
dlopen threaded memory leak
505+
Memcheck:Leak
506+
fun:calloc
507+
obj:*/libdl-*.so
508+
fun:dlopen*
509+
}
510+

strings/strmake.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ char *strmake(register char *dst, register const char *src, size_t length)
4141
write a character rather than '\0' as this makes spotting these
4242
problems in the results easier.
4343
*/
44-
uint n= strlen(src) + 1;
45-
if (n <= length)
46-
memset(dst + n, (int) 'Z', length - n + 1);
44+
uint n= 0;
45+
while (n < length && src[n++]);
46+
memset(dst + n, (int) 'Z', length - n + 1);
4747
#endif
4848

4949
while (length--)

0 commit comments

Comments
 (0)