Bug 449773 - Conditional jump or move depends on uninitialised value in KWin::DrmPipeline::checkTestBuffer
Summary: Conditional jump or move depends on uninitialised value in KWin::DrmPipeline:...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (show other bugs)
Version: 5.24.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on: 445894
Blocks: 446101
  Show dependency treegraph
 
Reported: 2022-02-08 06:56 UTC by Jiri Slaby
Modified: 2023-03-27 16:40 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Slaby 2022-02-08 06:56:14 UTC
+++ This bug was initially created as a clone of Bug #445894 +++

> Conditional jump or move depends on uninitialised value(s)
>    at 0xCD2EBCF: KWin::DrmPipeline::checkTestBuffer()::{lambda(QSharedPointer<KWin::DrmBuffer> const&)#1}::operator()(QSharedPointer<KWin::DrmBuffer> const&) const (drm_pipeline.cpp:306)
>    by 0xCD2EDA3: KWin::DrmPipeline::checkTestBuffer() (drm_pipeline.cpp:318)
>    by 0xCD2F41E: KWin::DrmPipeline::commitPipelinesAtomic(QVector<KWin::DrmPipeline*> const&, KWin::DrmPipeline::CommitMode, QVector<KWin::DrmObject*> const&) (drm_pipeline.cpp:131)
>    by 0xCD26BA8: KWin::DrmGpu::testPipelines() (drm_gpu.cpp:427)
>    by 0xCD29E27: KWin::DrmGpu::checkCrtcAssignment(QVector<KWin::DrmConnector*>, QVector<KWin::DrmCrtc*>) (drm_gpu.cpp:365)
>    by 0xCD29E27: KWin::DrmGpu::checkCrtcAssignment(QVector<KWin::DrmConnector*>, QVector<KWin::DrmCrtc*>) (drm_gpu.cpp:365)
>    by 0xCD3B298: UnknownInlinedFun (drm_gpu.cpp:398)
>    by 0xCD3B298: UnknownInlinedFun (drm_gpu.cpp:396)
>    by 0xCD3B298: KWin::DrmGpu::testPendingConfiguration(KWin::DrmGpu::TestMode) [clone .constprop.0] (drm_gpu.cpp:403)
>    by 0xCD14B43: KWin::DrmBackend::updateOutputs() (drm_gpu.cpp:309)
>    by 0xCD16F0C: KWin::DrmBackend::handleUdevEvent() (drm_backend.cpp:237)
>    by 0x6FC54F2: UnknownInlinedFun (qobjectdefs_impl.h:398)
>    by 0x6FC54F2: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
>    by 0x6FC88CE: QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (moc_qsocketnotifier.cpp:178)
>    by 0x6FC90CA: QSocketNotifier::event(QEvent*) (qsocketnotifier.cpp:302)
>  Uninitialised value was created by a stack allocation
>    at 0xCD329F0: QtPrivate::QSlotObject<bool (KWin::EglGbmBackend::*)(KWin::DrmAbstractOutput*), QtPrivate::List<KWin::DrmAbstractOutput*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (qobjectdefs_impl.h:411)

(In reply to Vlad Zahorodnii from bug 445894 comment #23)
> > So it's the pointer returned by backend->drmFormat(m_output);
> 
> drmFormat() returns an integer. can you add a default member initializer for
> GbmFormat::drmFormat, i.e.
> 
> struct GbmFormat
> {
>     uint32_t drmFormat = 0;

Sure, this makes it go away.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20211117
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.15.2-1.g26a203b-default (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i7-6600U CPU @ 2.60GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520
Comment 1 Zamundaaa 2023-03-27 16:40:36 UTC
The relevant code no longer exists