Bug 346969

Summary: Valgrind warning on the FStabBackend
Product: [Frameworks and Libraries] frameworks-solid Reporter: Aleix Pol <aleixpol>
Component: generalAssignee: Lukáš Tinkl <lukas>
Status: RESOLVED FIXED    
Severity: normal CC: jburgess777, kde, kdelibs-bugs-null
Priority: NOR    
Version First Reported In: 5.9.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Aleix Pol 2015-04-30 17:24:40 UTC
I'm unsure if it's related to some crash or something, but this is quite reproducible and maybe the reason of some crash.
To get this, run "valgrind plasmawindowed org.kde.plasma.systemtray"

==12575== Invalid read of size 1
==12575==    at 0xA0D4F44: getmntent_r (in /usr/lib/libc-2.21.so)
==12575==    by 0x1C824820: Solid::Backends::Fstab::FstabHandling::_k_updateFstabMountPointsCache() (fstabhandling.cpp:141)
==12575==    by 0x1C824868: Solid::Backends::Fstab::FstabHandling::deviceList() (fstabhandling.cpp:196)
==12575==    by 0x1C821053: Solid::Backends::Fstab::FstabManager::FstabManager(QObject*) (fstabmanager.cpp:37)
==12575==    by 0x1C7D0F0A: Solid::ManagerBasePrivate::loadBackends() (managerbase.cpp:82)
==12575==    by 0x1C7D85A0: Solid::DeviceManagerPrivate::DeviceManagerPrivate() (devicemanager.cpp:38)
==12575==    by 0x1C7D9A20: Solid::DeviceManagerStorage::ensureManagerCreated() (devicemanager.cpp:294)
==12575==    by 0x1C7D9999: Solid::DeviceManagerStorage::managerBackends() (devicemanager.cpp:281)
==12575==    by 0x1C7D8F11: Solid::Device::listFromQuery(Solid::Predicate const&, QString const&) (devicemanager.cpp:129)
==12575==    by 0x33C34AAD: HotplugEngine::init() (hotplugengine.cpp:74)
==12575==    by 0x33C347AF: HotplugEngine::HotplugEngine(QObject*, QList<QVariant> const&) (hotplugengine.cpp:55)
==12575==    by 0x33C395EA: QObject* KPluginFactory::createInstance<HotplugEngine, QObject>(QWidget*, QObject*, QList<QVariant> const&) (kpluginfactory.h:477)
==12575==  Address 0x18210b1f is 1 bytes before a block of size 4,096 alloc'd
==12575==    at 0x4C29F90: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==12575==    by 0xA0D4CDD: allocate (in /usr/lib/libc-2.21.so)
==12575==    by 0xE445E3A: __pthread_once_slow (in /usr/lib/libpthread-2.21.so)
==12575==    by 0xA0D4D53: getmntent (in /usr/lib/libc-2.21.so)
==12575==    by 0x1C824820: Solid::Backends::Fstab::FstabHandling::_k_updateFstabMountPointsCache() (fstabhandling.cpp:141)
==12575==    by 0x1C824868: Solid::Backends::Fstab::FstabHandling::deviceList() (fstabhandling.cpp:196)
==12575==    by 0x1C821053: Solid::Backends::Fstab::FstabManager::FstabManager(QObject*) (fstabmanager.cpp:37)
==12575==    by 0x1C7D0F0A: Solid::ManagerBasePrivate::loadBackends() (managerbase.cpp:82)
==12575==    by 0x1C7D85A0: Solid::DeviceManagerPrivate::DeviceManagerPrivate() (devicemanager.cpp:38)
==12575==    by 0x1C7D9A20: Solid::DeviceManagerStorage::ensureManagerCreated() (devicemanager.cpp:294)
==12575==    by 0x1C7D9999: Solid::DeviceManagerStorage::managerBackends() (devicemanager.cpp:281)
==12575==    by 0x1C7D8F11: Solid::Device::listFromQuery(Solid::Predicate const&, QString const&) (devicemanager.cpp:129)
Comment 1 Jon Burgess 2015-12-20 15:27:18 UTC
This appears to be a glibc bug: https://sourceware.org/bugzilla/show_bug.cgi?id=18887
Comment 2 Justin Zobel 2021-03-09 05:53:57 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 3 Aleix Pol 2021-03-09 13:02:13 UTC
I don't get it anymore.
Comment 4 Aleix Pol 2021-03-09 13:02:23 UTC
I don't get it anymore.