Code review comment for ~ahasenack/ubuntu/+source/samba:bionic-samba-memleak-1814532

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Ok, got something.

First, the full logs:
old samba: http://paste.ubuntu.com/p/CCR4fbFf84/
new samba: http://paste.ubuntu.com/p/Hmw6QGHVqP/

In the old log, we can see the affected vfswrap_getwd function being called and flagged in a few places:

==9522== 36 bytes in 3 blocks are definitely lost in loss record 123 of 498
==9522== at 0x4C31D2F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9522== by 0x8A8B15F: getcwd (getcwd.c:84)
==9522== by 0x55A452D: vfswrap_getwd (vfs_default.c:2227)

In thw new log file, there is no "vfs" match anywhere.

This is the call I used:
smbclient //localhost/pub -U ubuntu%ubuntu -c "pwd;dir;cd dir1;dir;pwd;cd dir11; pwd; dir; cd /; cd dir2; pwd; dir; cd /"

And pub was created as:
# tree /pub
/pub
├── dir1
│   └── dir11
└── dir2

[pub]
 path = /pub
 read only = no
 guest ok = no

And I had this global option set, to not use a cache and provoke more leaks:
[global]
...
 getwd cache = no

« Back to merge proposal