D29814: Fix segfault on no restart args

2020-05-27 Thread Jiří Paleček
jpalecek added a comment.


  In D29814#674013 , @dfaure wrote:
  
  > I'm a bit confused by the bug this is fixing. Surely this doesn't happen to 
all cases of crashes without autorestart enabled??
  >
  > Also, it sounds like a null check might be enough.
  
  
  No. It is a crash where `s_autoRestartCommandLine` was null. The actual crash 
happened in the logging code, but it is also used in `startProcess` and I think 
going for non-null `s_autoRestartCommandLine` is actually easier than faffing 
with null pointer checks and special casing in the signal handler code. Even 
with no restart arguments, you still need `argv` to hold the executable name to 
restart, so why not maintain it uniformly? It only costs a few bytes of heap.

INLINE COMMENTS

> dfaure wrote in kcrash.cpp:107
> Should this become 1 then? Otherwise the `for` loop won't delete that new 
> `new char*[1]`

No. The invariant is that `s_autoRestartArgc` is the number of arguments, not 
counting the last `null`. The `new char*[1]` is deleted after the loop.

> dfaure wrote in kcrash.cpp:272
> insert(0) reads like prepend, but args is empty anyway, why not just use 
> append?

Well I was thinking about `resize()`, then found there wasn't any. However, if 
we want to be clear, maybe `args = { QString() }` would be the best?

(In reality, the effect should be `args = { filePath }`, but that comes with 
the next line.)

REPOSITORY
  R285 KCrash

REVISION DETAIL
  https://phabricator.kde.org/D29814

To: jpalecek, #frameworks, dfaure
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D17816: Support for xattrs on kio copy/move

2020-05-27 Thread Stefan Brüns
bruns requested changes to this revision.
bruns added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> jobtest.cpp:487
> +attrs["user.fattr.with.a.lot.of.namespaces"] = "true";
> +attrs["user.name with space"] = "value with spaces";
> +return attrs;

this obviously needs test cases with a key ley/value len > 512, to check the 
the array-to-short/resize path.

> file_unix.cpp:155
> +if (errno == ERANGE) {
> +keylist.resize(listlen + 512);
> +}

This is still definitely wrong ...

> file_unix.cpp:200
> +if (valuelen == -1 && errno == ERANGE) {
> +value.resize(valuelen + 512);
> +}

also wrong ...

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17816

To: arrowd, dfaure, chinmoyr, bruns, #frameworks, tmarshall, usta, cochise
Cc: usta, scheirle, tmarshall, arrowd, cfeck, bruns, phidrho, dhaumann, 
funkybomber, abika, pino, davidedmundson, ngraham, atha.kane, spoorun, 
nicolasfella, kde-frameworks-devel, LeGast00n, cblack, michaelh


D29814: Fix segfault on no restart args

2020-05-27 Thread David Faure
dfaure requested changes to this revision.
dfaure added a comment.
This revision now requires changes to proceed.


  I'm a bit confused by the bug this is fixing. Surely this doesn't happen to 
all cases of crashes without autorestart enabled??
  
  Also, it sounds like a null check might be enough.

INLINE COMMENTS

> kcrash.cpp:107
>  static char *s_appPath = nullptr;
>  static int s_autoRestartArgc = 0;
> +static char **s_autoRestartCommandLine = new char*[1]{ nullptr };

Should this become 1 then? Otherwise the `for` loop won't delete that new `new 
char*[1]`

> kcrash.cpp:272
> +if (args.isEmpty()) // edge case: tst_QX11Info::startupId does 
> QApplication app(argc, nullptr)...
> +args.insert(0, QString());
> +

insert(0) reads like prepend, but args is empty anyway, why not just use append?

> kcrash.cpp:275
> +args[0] = filePath; // replace argv[0] with full path above
> +for (int arg = 0; arg < s_autoRestartArgc; arg++)
> +delete [] s_autoRestartCommandLine[arg];

We use { ... } braces also around single-line statements in KF5.

Can you do the same for the `if` above too?

REPOSITORY
  R285 KCrash

REVISION DETAIL
  https://phabricator.kde.org/D29814

To: jpalecek, #frameworks, dfaure
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29810: Don't use the setenv function after fork

2020-05-27 Thread David Faure
dfaure accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R285 KCrash

BRANCH
  for-upstream

REVISION DETAIL
  https://phabricator.kde.org/D29810

To: jpalecek, #frameworks, dfaure
Cc: bruns, apol, anthonyfieroni, kde-frameworks-devel, LeGast00n, cblack, 
michaelh, ngraham


D29809: Don't invoke qstring localized stuff in critical section

2020-05-27 Thread David Faure
dfaure added a comment.


  Makes sense; just two minor things.

INLINE COMMENTS

> kcrash.cpp:95
> +#ifdef Q_OS_LINUX
> +QByteArray socketpath;
> +#endif

prepend `static`, it's only used in this file.

> kcrash.cpp:662
>  
> -// Create socket path to transfer ptrace scope and open connection
> -const QByteArray socketpath = QFile::encodeName(
> -
> QStringLiteral("%1/kcrash_%2").arg(QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation))
> -  .arg(getpid()));
> +using KCrash::socketpath;
>  int sockfd = openDrKonqiSocket(socketpath);

It would be more consistent with the other global vars to name it `s_socketpath`
(and outside the KCrash namespace)

REPOSITORY
  R285 KCrash

REVISION DETAIL
  https://phabricator.kde.org/D29809

To: jpalecek, #frameworks, dfaure
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D17816: Support for xattrs on kio copy/move

2020-05-27 Thread Gleb Popov
arrowd marked an inline comment as done.
arrowd added a comment.


  Mark stale command as done.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17816

To: arrowd, dfaure, chinmoyr, bruns, #frameworks, tmarshall, usta, cochise
Cc: usta, scheirle, tmarshall, arrowd, cfeck, bruns, phidrho, dhaumann, 
funkybomber, abika, pino, davidedmundson, ngraham, atha.kane, spoorun, 
nicolasfella, kde-frameworks-devel, LeGast00n, cblack, michaelh


D17816: Support for xattrs on kio copy/move

2020-05-27 Thread Gleb Popov
arrowd updated this revision to Diff 83166.
arrowd marked an inline comment as done.
arrowd added a comment.


  - Use std::function to store a generator function for m_setXattrCmd's 
arguments.

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17816?vs=83143=83166

BRANCH
  arcpatch-D17816

REVISION DETAIL
  https://phabricator.kde.org/D17816

AFFECTED FILES
  autotests/jobtest.cpp
  autotests/jobtest.h
  src/ioslaves/file/ConfigureChecks.cmake
  src/ioslaves/file/config-kioslave-file.h.cmake
  src/ioslaves/file/file.h
  src/ioslaves/file/file_unix.cpp

To: arrowd, dfaure, chinmoyr, bruns, #frameworks, tmarshall, usta, cochise
Cc: usta, scheirle, tmarshall, arrowd, cfeck, bruns, phidrho, dhaumann, 
funkybomber, abika, pino, davidedmundson, ngraham, atha.kane, spoorun, 
nicolasfella, kde-frameworks-devel, LeGast00n, cblack, michaelh


KDE CI: Frameworks » krunner » kf5-qt5 SUSEQt5.14 - Build # 21 - Still Unstable!

2020-05-27 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/krunner/job/kf5-qt5%20SUSEQt5.14/21/
 Project:
kf5-qt5 SUSEQt5.14
 Date of build:
Wed, 27 May 2020 18:04:25 +
 Build duration:
3 min 18 sec and counting
   BUILD ARTIFACTS
  abi-compatibility-results.yamlacc/KF5Runner-5.71.0.xmlcompat_reports/KF5Runner_compat_report.htmllogs/KF5Runner/5.71.0/log.txt
   JUnit Tests
  Name: (root) Failed: 0 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 1 test(s)Name: projectroot Failed: 1 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 2 test(s)Failed: projectroot.autotests.runnercontexttest
   Cobertura Report
  
   Project Coverage Summary
  
   Name
  PackagesFilesClassesLinesConditionalsCobertura Coverage Report50%
(2/4)65%
(11/17)65%
(11/17)47%
(726/1555)32%
(254/804)Coverage Breakdown by Package
Name
   FilesClassesLinesConditionalsautotests67%
(2/3)67%
(2/3)78%
(131/167)53%
(52/98)src90%
(9/10)90%
(9/10)49%
(595/1210)33%
(202/606)src.declarative0%
(0/2)0%
(0/2)0%
(0/134)0%
(0/96)tests0%
(0/2)0%
(0/2)0%
(0/44)0%
(0/4)

KDE CI: Frameworks » krunner » kf5-qt5 SUSEQt5.12 - Build # 98 - Still Unstable!

2020-05-27 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/krunner/job/kf5-qt5%20SUSEQt5.12/98/
 Project:
kf5-qt5 SUSEQt5.12
 Date of build:
Wed, 27 May 2020 18:04:25 +
 Build duration:
3 min 15 sec and counting
   BUILD ARTIFACTS
  abi-compatibility-results.yamlacc/KF5Runner-5.71.0.xmlcompat_reports/KF5Runner_compat_report.htmllogs/KF5Runner/5.71.0/log.txt
   JUnit Tests
  Name: (root) Failed: 0 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 1 test(s)Name: projectroot Failed: 1 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 2 test(s)Failed: projectroot.autotests.runnercontexttest
   Cobertura Report
  
   Project Coverage Summary
  
   Name
  PackagesFilesClassesLinesConditionalsCobertura Coverage Report50%
(2/4)65%
(11/17)65%
(11/17)47%
(726/1554)32%
(254/804)Coverage Breakdown by Package
Name
   FilesClassesLinesConditionalsautotests67%
(2/3)67%
(2/3)78%
(131/167)53%
(52/98)src90%
(9/10)90%
(9/10)49%
(595/1210)33%
(202/606)src.declarative0%
(0/2)0%
(0/2)0%
(0/133)0%
(0/96)tests0%
(0/2)0%
(0/2)0%
(0/44)0%
(0/4)

KDE CI: Frameworks » krunner » kf5-qt5 FreeBSDQt5.14 - Build # 22 - Still Unstable!

2020-05-27 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/krunner/job/kf5-qt5%20FreeBSDQt5.14/22/
 Project:
kf5-qt5 FreeBSDQt5.14
 Date of build:
Wed, 27 May 2020 18:04:25 +
 Build duration:
1 min 34 sec and counting
   JUnit Tests
  Name: projectroot Failed: 1 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 2 test(s)Failed: projectroot.autotests.runnercontexttest

D29461: Fix kio-extras build on Windows

2020-05-27 Thread Piyush Aggarwal
brute4s99 closed this revision.

REPOSITORY
  R320 KIO Extras

REVISION DETAIL
  https://phabricator.kde.org/D29461

To: brute4s99, vonreth, meven
Cc: sitter, meven, kde-frameworks-devel, kfm-devel, waitquietly, azyx, 
nikolaik, pberestov, iasensio, aprcela, fprice, LeGast00n, cblack, 
fbampaloukas, alexde, Codezela, feverfew, michaelh, spoorun, navarromorales, 
firef, ngraham, andrebarros, bruns, emmanuelp, rdieter, mikesomov


Re: [ANNOUNCE] CMake 3.16.6 available for download

2020-05-27 Thread Robert Maynard
The subject should have been 3.16.7 has been released :(

On Wed, May 27, 2020 at 11:15 AM Robert Maynard
 wrote:
>
> We are pleased to announce that CMake 3.16.7 is now available for download.
>
> Please use the latest release from our download page:
>   https://cmake.org/download/
>
> Thanks for your support!
>
> -
> Changes in 3.16.7 since 3.16.6:
>
> Brad King (14):
>   AIX: Activate symbol export/import IBM i (OS400)
>   target_precompile_headers: Fix documented example using genex
>   Makefiles: Scan Objective C/C++ preprocessor dependencies
>   Makefiles: Add Objective C/C++ compilations to compile_commands.json
>   CheckLanguage: Fix forwarding of CMAKE_CUDA_HOST_COMPILER
>   FindGTK2: Add harfbuzz target for dependency from pango
>   VS: Fix using PCH from source with COMPILE_OPTIONS
>   MSVC: Use 'pragma system_header' in PCH only on cl 19.13 and above
>   Help: Document OBJC and OBJCXX env vars for Objective C/C++ compilers
>   Objective C/C++: Honor CC and CXX env vars to select compiler
>   cmGeneratorTarget: Clear AllConfigSources in ClearSourcesCache
>   Help: Add 3.16.7 release note for FindPkgConfig '-isystem' fix
>   VS: Restore .sln support for VS Version Selector
>   CMake 3.16.7
>
> Chuck Atkins (1):
>   FindMPI: Add the pgi compiler wrapper names used by IBM Spectrum MPI
>
> Rolf Eike Beer (1):
>   FindPkgConfig: also handle "-isystem" prefixes for include directories


[ANNOUNCE] CMake 3.16.6 available for download

2020-05-27 Thread Robert Maynard
We are pleased to announce that CMake 3.16.7 is now available for download.

Please use the latest release from our download page:
  https://cmake.org/download/

Thanks for your support!

-
Changes in 3.16.7 since 3.16.6:

Brad King (14):
  AIX: Activate symbol export/import IBM i (OS400)
  target_precompile_headers: Fix documented example using genex
  Makefiles: Scan Objective C/C++ preprocessor dependencies
  Makefiles: Add Objective C/C++ compilations to compile_commands.json
  CheckLanguage: Fix forwarding of CMAKE_CUDA_HOST_COMPILER
  FindGTK2: Add harfbuzz target for dependency from pango
  VS: Fix using PCH from source with COMPILE_OPTIONS
  MSVC: Use 'pragma system_header' in PCH only on cl 19.13 and above
  Help: Document OBJC and OBJCXX env vars for Objective C/C++ compilers
  Objective C/C++: Honor CC and CXX env vars to select compiler
  cmGeneratorTarget: Clear AllConfigSources in ClearSourcesCache
  Help: Add 3.16.7 release note for FindPkgConfig '-isystem' fix
  VS: Restore .sln support for VS Version Selector
  CMake 3.16.7

Chuck Atkins (1):
  FindMPI: Add the pgi compiler wrapper names used by IBM Spectrum MPI

Rolf Eike Beer (1):
  FindPkgConfig: also handle "-isystem" prefixes for include directories


KDE CI: Frameworks » kdeclarative » kf5-qt5 FreeBSDQt5.14 - Build # 20 - Still Unstable!

2020-05-27 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/kdeclarative/job/kf5-qt5%20FreeBSDQt5.14/20/
 Project:
kf5-qt5 FreeBSDQt5.14
 Date of build:
Wed, 27 May 2020 14:16:28 +
 Build duration:
1 min 24 sec and counting
   JUnit Tests
  Name: projectroot Failed: 1 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 2 test(s)Failed: projectroot.autotests.quickviewsharedengine

KDE CI: Frameworks » solid » kf5-qt5 FreeBSDQt5.14 - Build # 29 - Still Unstable!

2020-05-27 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/solid/job/kf5-qt5%20FreeBSDQt5.14/29/
 Project:
kf5-qt5 FreeBSDQt5.14
 Date of build:
Wed, 27 May 2020 11:26:08 +
 Build duration:
1 min 54 sec and counting
   JUnit Tests
  Name: projectroot Failed: 1 test(s), Passed: 3 test(s), Skipped: 0 test(s), Total: 4 test(s)Failed: projectroot.autotests.halbasictest

KDE CI: Frameworks » krunner » kf5-qt5 SUSEQt5.14 - Build # 20 - Still Unstable!

2020-05-27 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/krunner/job/kf5-qt5%20SUSEQt5.14/20/
 Project:
kf5-qt5 SUSEQt5.14
 Date of build:
Wed, 27 May 2020 07:48:45 +
 Build duration:
2 min 44 sec and counting
   BUILD ARTIFACTS
  abi-compatibility-results.yamlacc/KF5Runner-5.71.0.xmlcompat_reports/KF5Runner_compat_report.htmllogs/KF5Runner/5.71.0/log.txt
   JUnit Tests
  Name: (root) Failed: 0 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 1 test(s)Name: projectroot Failed: 1 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 2 test(s)Failed: projectroot.autotests.runnercontexttest
   Cobertura Report
  
   Project Coverage Summary
  
   Name
  PackagesFilesClassesLinesConditionalsCobertura Coverage Report50%
(2/4)65%
(11/17)65%
(11/17)47%
(726/1557)32%
(254/804)Coverage Breakdown by Package
Name
   FilesClassesLinesConditionalsautotests67%
(2/3)67%
(2/3)78%
(131/167)53%
(52/98)src90%
(9/10)90%
(9/10)49%
(595/1212)33%
(202/606)src.declarative0%
(0/2)0%
(0/2)0%
(0/134)0%
(0/96)tests0%
(0/2)0%
(0/2)0%
(0/44)0%
(0/4)

KDE CI: Frameworks » krunner » kf5-qt5 SUSEQt5.12 - Build # 97 - Still Unstable!

2020-05-27 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/krunner/job/kf5-qt5%20SUSEQt5.12/97/
 Project:
kf5-qt5 SUSEQt5.12
 Date of build:
Wed, 27 May 2020 07:48:45 +
 Build duration:
1 min 42 sec and counting
   BUILD ARTIFACTS
  abi-compatibility-results.yamlacc/KF5Runner-5.71.0.xmlcompat_reports/KF5Runner_compat_report.htmllogs/KF5Runner/5.71.0/log.txt
   JUnit Tests
  Name: (root) Failed: 0 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 1 test(s)Name: projectroot Failed: 1 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 2 test(s)Failed: projectroot.autotests.runnercontexttest
   Cobertura Report
  
   Project Coverage Summary
  
   Name
  PackagesFilesClassesLinesConditionalsCobertura Coverage Report50%
(2/4)65%
(11/17)65%
(11/17)47%
(726/1556)32%
(254/804)Coverage Breakdown by Package
Name
   FilesClassesLinesConditionalsautotests67%
(2/3)67%
(2/3)78%
(131/167)53%
(52/98)src90%
(9/10)90%
(9/10)49%
(595/1212)33%
(202/606)src.declarative0%
(0/2)0%
(0/2)0%
(0/133)0%
(0/96)tests0%
(0/2)0%
(0/2)0%
(0/44)0%
(0/4)

KDE CI: Frameworks » krunner » kf5-qt5 FreeBSDQt5.14 - Build # 21 - Still Unstable!

2020-05-27 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/krunner/job/kf5-qt5%20FreeBSDQt5.14/21/
 Project:
kf5-qt5 FreeBSDQt5.14
 Date of build:
Wed, 27 May 2020 07:48:45 +
 Build duration:
1 min 24 sec and counting
   JUnit Tests
  Name: projectroot Failed: 1 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 2 test(s)Failed: projectroot.autotests.runnercontexttest

D29050: KRunner fix prepare/teardown signals

2020-05-27 Thread Alexander Lohnau
alex closed this revision.

REPOSITORY
  R308 KRunner

REVISION DETAIL
  https://phabricator.kde.org/D29050

To: alex, meven, ngraham, broulik
Cc: davidedmundson, cfeck, kde-frameworks-devel, Orage, LeGast00n, 
The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, michaelh, 
ZrenBot, ngraham, bruns, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, ahiemstra, mart