[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2018-04-09 Thread Simon Andric
https://bugs.kde.org/show_bug.cgi?id=386983

Simon Andric  changed:

   What|Removed |Added

 CC||simonandr...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-12-06 Thread Ar
https://bugs.kde.org/show_bug.cgi?id=386983

Ar  changed:

   What|Removed |Added

 CC||ari.re...@gmail.com

--- Comment #18 from Ar  ---
Same issue on Fedora 27.

Moreover, in addition to crashing, for some reason when adding CDRtools the
"writing" window stays in 0% progress until the bluray writing finishes, and it
doesn't pick up the 'dark' theme. Other KDE apps on Fedora 27 are able to pick
up the fedora dark theme but k3b no longer does it.

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-12-05 Thread Leslie Zhai
https://bugs.kde.org/show_bug.cgi?id=386983

--- Comment #17 from Leslie Zhai  ---
(In reply to Ismail Donmez from comment #16)
> (In reply to Leslie Zhai from comment #15)
> > (In reply to Ismail Donmez from comment #14)
> > > Hi,
> > > 
> > > I don't understand
> > > https://cgit.kde.org/k3b.git/commit/
> > > ?id=ce5d7b139d07a875ea89fe049be852baf23f99f7 at all.
> > > 
> > > +d->gcBins << d->bins;
> > >  d->bins.clear();
> > > 
> > > and where do you use d->gcBins exactly?
> > 
> > https://github.com/KDE/k3b/blob/master/libk3b/core/k3bexternalbinmanager.
> > cpp#L188
> 
> That's deletion, you don't actually use it at all. This fix looks very very
> wrong.

So it is called gcBins for Garbage Collection.

But it is not able to free d->bins directly due to heap-use-after-free issue
https://bugsfiles.kde.org/attachment.cgi?id=109022

You could rollback the commit, then rebuild K3B with such option to reproduce
the issue:

cmake .. -DCMAKE_INSTALL_PREFIX=/usr\ 
-DCMAKE_CXX_COMPILER=clang++\   
-DECM_ENABLE_SANITIZERS='address;undefined'\
   
-DCMAKE_CXX_FLAGS="-fsanitize-coverage=edge,indirect-calls,8bit-counters,trace-bb,trace-cmp"
\
-DCMAKE_BUILD_TYPE=Debug \  
-DKDE_INSTALL_LIBDIR=lib\   
-DKDE_INSTALL_LIBEXECDIR=lib\   
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON   \   
-DK3B_BUILD_API_DOCS=ON \   
-DK3B_ENABLE_PERMISSION_HELPER=ON   \   
-DK3B_DEBUG=ON


Regards,
Leslie Zhai - a LLVM developer https://reviews.llvm.org/p/xiangzhai/

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-12-05 Thread Ismail Donmez
https://bugs.kde.org/show_bug.cgi?id=386983

--- Comment #16 from Ismail Donmez  ---
(In reply to Leslie Zhai from comment #15)
> (In reply to Ismail Donmez from comment #14)
> > Hi,
> > 
> > I don't understand
> > https://cgit.kde.org/k3b.git/commit/
> > ?id=ce5d7b139d07a875ea89fe049be852baf23f99f7 at all.
> > 
> > +d->gcBins << d->bins;
> >  d->bins.clear();
> > 
> > and where do you use d->gcBins exactly?
> 
> https://github.com/KDE/k3b/blob/master/libk3b/core/k3bexternalbinmanager.
> cpp#L188

That's deletion, you don't actually use it at all. This fix looks very very
wrong.

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-12-05 Thread Leslie Zhai
https://bugs.kde.org/show_bug.cgi?id=386983

--- Comment #15 from Leslie Zhai  ---
(In reply to Ismail Donmez from comment #14)
> Hi,
> 
> I don't understand
> https://cgit.kde.org/k3b.git/commit/
> ?id=ce5d7b139d07a875ea89fe049be852baf23f99f7 at all.
> 
> +d->gcBins << d->bins;
>  d->bins.clear();
> 
> and where do you use d->gcBins exactly?

https://github.com/KDE/k3b/blob/master/libk3b/core/k3bexternalbinmanager.cpp#L188

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-12-05 Thread Ismail Donmez
https://bugs.kde.org/show_bug.cgi?id=386983

Ismail Donmez  changed:

   What|Removed |Added

 CC||ism...@i10z.com

--- Comment #14 from Ismail Donmez  ---
Hi,

I don't understand
https://cgit.kde.org/k3b.git/commit/?id=ce5d7b139d07a875ea89fe049be852baf23f99f7
at all.

+d->gcBins << d->bins;
 d->bins.clear();

and where do you use d->gcBins exactly?

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-28 Thread Aloysius
https://bugs.kde.org/show_bug.cgi?id=386983

--- Comment #13 from Aloysius  ---
What about clearing the widget before refreshing it?

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-27 Thread Leslie Zhai
https://bugs.kde.org/show_bug.cgi?id=386983

--- Comment #12 from Leslie Zhai  ---
Git commit ce5d7b139d07a875ea89fe049be852baf23f99f7 by Leslie Zhai.
Committed on 28/11/2017 at 02:00.
Pushed by lesliezhai into branch 'master'.

Fix Memory-leak issue detected by clang analyzer long time ago

M  +4-1libk3b/core/k3bexternalbinmanager.cpp

https://commits.kde.org/k3b/ce5d7b139d07a875ea89fe049be852baf23f99f7

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-26 Thread Leslie Zhai
https://bugs.kde.org/show_bug.cgi?id=386983

--- Comment #11 from Leslie Zhai  ---
(In reply to Aloysius from comment #10)
> But, by the way, doesn't this introduce the risk of a memory leak?

Yes, workaround patch, I need to find the root cause!

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-23 Thread Aloysius
https://bugs.kde.org/show_bug.cgi?id=386983

--- Comment #10 from Aloysius  ---
But, by the way, doesn't this introduce the risk of a memory leak?

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-23 Thread Aloysius
https://bugs.kde.org/show_bug.cgi?id=386983

--- Comment #9 from Aloysius  ---
Confirm no segfault on latest trunk version.

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-22 Thread Leslie Zhai
https://bugs.kde.org/show_bug.cgi?id=386983

Leslie Zhai  changed:

   What|Removed |Added

 Resolution|UPSTREAM|FIXED
  Latest Commit||https://commits.kde.org/k3b
   ||/5e13d929f4c1e48462826ca126
   ||49475ff663ac62

--- Comment #8 from Leslie Zhai  ---
Git commit 5e13d929f4c1e48462826ca12649475ff663ac62 by Leslie Zhai.
Committed on 23/11/2017 at 05:19.
Pushed by lesliezhai into branch 'master'.

Workaround for fixing segfault.

M  +0-1libk3b/core/k3bexternalbinmanager.cpp

https://commits.kde.org/k3b/5e13d929f4c1e48462826ca12649475ff663ac62

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-22 Thread Leslie Zhai
https://bugs.kde.org/show_bug.cgi?id=386983

--- Comment #7 from Leslie Zhai  ---
Git commit d2d1b578acb3a71ca8e6f0c8019c2dc0193819de by Leslie Zhai.
Committed on 23/11/2017 at 03:50.
Pushed by lesliezhai into branch 'master'.

Update fuzzer testcase for QFile and QString.

M  +1-1CMakeLists.txt
M  +2-1INSTALL.txt
M  +4-5tests/CMakeLists.txt
M  +17   -7tests/k3bfuzzertest.cpp

https://commits.kde.org/k3b/d2d1b578acb3a71ca8e6f0c8019c2dc0193819de

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-22 Thread Leslie Zhai
https://bugs.kde.org/show_bug.cgi?id=386983

--- Comment #6 from Leslie Zhai  ---
Created attachment 109022
  --> https://bugs.kde.org/attachment.cgi?id=109022=edit
sanitizer.log

1. UndefinedBehaviorSanitizer: undefined-behavior
/data/project/kde/k3b/src/option/k3bexternalbinpermissionmodel.cpp:109:44 in 
/data/project/kde/k3b/libk3b/core/k3bexternalbinmanager.cpp:117:12: runtime
error: member access within address 0x6020001c9ab0 which does not point to an
object of type 'const K3b::ExternalBin'
0x6020001c9ab0: note: object has invalid vptr

2. AddressSanitizer: heap-use-after-free on address 0x6020001c9ab8 at pc
0x7f7f6d951526 bp 0x7ffe4852c8b0 sp 0x7ffe4852c8a8
READ of size 8 at 0x6020001c9ab8 thread T0  
#0 0x7f7f6d951525 in K3b::ExternalBin::path() const
/data/project/kde/k3b/libk3b/core/k3bexternalbinmanager.cpp:117:12

3. 0x6020001c9ab8 is located 8 bytes inside of 16-byte region
[0x6020001c9ab0,0x6020001c9ac0)
freed by thread T0 here:
#0 0x58f5fb in operator delete(void*)
/data/project/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:149:3
#1 0x7f7f6d9508f7 in K3b::ExternalBin::~ExternalBin()
/data/project/kde/k3b/libk3b/core/k3bexternalbinmanager.cpp:74:1

4. previously allocated by thread T0 here:  
#0 0x58e99b in operator new(unsigned long)
/data/project/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:92:3
#1 0x7f7f6d956482 in K3b::SimpleExternalProgram::scan(QString const&)
/data/project/kde/k3b/libk3b/core/k3bexternalbinmanager.cpp:346:33



Workaround patch is remove delete to bring in Memory-leak issue, but I want to
find the root cause instead!

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-22 Thread Leslie Zhai
https://bugs.kde.org/show_bug.cgi?id=386983

--- Comment #5 from Leslie Zhai  ---
Git commit 5a0d015cbd440ae42440e682375a43df82dfec98 by Leslie Zhai.
Committed on 23/11/2017 at 02:25.
Pushed by lesliezhai into branch 'master'.

Use Address and Undefined Behaviour Sanitizer to debug.

Please see attachment: sanitizer.log

M  +3-1INSTALL.txt

https://commits.kde.org/k3b/5a0d015cbd440ae42440e682375a43df82dfec98

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-22 Thread Luigi Toscano
https://bugs.kde.org/show_bug.cgi?id=386983

Luigi Toscano  changed:

   What|Removed |Added

 CC||luigi.tosc...@tiscali.it

--- Comment #4 from Luigi Toscano  ---
Maybe not printing directly the unmodified raw data could help?

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-22 Thread Aloysius
https://bugs.kde.org/show_bug.cgi?id=386983

Aloysius  changed:

   What|Removed |Added

 CC||aloi...@gmx.com

--- Comment #3 from Aloysius  ---
Created attachment 109013
  --> https://bugs.kde.org/attachment.cgi?id=109013=edit
k3b valgrind log

Are you quite sure the qt.io bug is related to this?

See what valgrind has to say about it.

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-22 Thread Aloysius
https://bugs.kde.org/show_bug.cgi?id=386983

--- Comment #2 from Aloysius  ---
(In reply to Leslie Zhai from comment #1)
> 
> Thanks for your PR! it is very clear: QFile::encodeName(...) failed to work!
> 
> 
> (ExternalBinPermissionModel) unable to stat  "\n\u\n\uʱ"
> (ExternalBinPermissionModel) unable to stat  "\n\u\n\uʱ"
> (ExternalBinPermissionModel) unable to stat  "\n\u\n\uʱ"
> (ExternalBinPermissionModel) unable to stat  "\n\u\n\uʱ"
Sorry, I can't find that exact string in my log.

> I reported similar BUG https://bugreports.qt.io/browse/QTBUG-57553
>From what I can see, upstream marked it as "invalid".
Has it actually been addressed? If so, can it be backported to older Qt
releases?

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-21 Thread Leslie Zhai
https://bugs.kde.org/show_bug.cgi?id=386983

Leslie Zhai  changed:

   What|Removed |Added

 Resolution|--- |UPSTREAM
 Status|UNCONFIRMED |RESOLVED
 CC||lesliez...@llvm.org.cn

--- Comment #1 from Leslie Zhai  ---
Hi Aloysius,

Thanks for your PR! it is very clear: QFile::encodeName(...) failed to work!


(ExternalBinPermissionModel) unable to stat  "\n\u\n\uʱ"
(ExternalBinPermissionModel) unable to stat  "\n\u\n\uʱ"
(ExternalBinPermissionModel) unable to stat  "\n\u\n\uʱ"
(ExternalBinPermissionModel) unable to stat  "\n\u\n\uʱ"


I reported similar BUG https://bugreports.qt.io/browse/QTBUG-57553

Regards,
Leslie Zhai

-- 
You are receiving this mail because:
You are watching all bug changes.

[k3b] [Bug 386983] Refresh button in the Programs section causes segfault

2017-11-16 Thread Dr . Chapatin
https://bugs.kde.org/show_bug.cgi?id=386983

Dr. Chapatin  changed:

   What|Removed |Added

 CC||bugsefor...@gmx.com

-- 
You are receiving this mail because:
You are watching all bug changes.