mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-26 20:55:19 +03:00
22 lines
1.1 KiB
Diff
22 lines
1.1 KiB
Diff
Author: Aron Barath <aron-alpine@mailbox.org>
|
|
|
|
Code falsely assumes that new threads on a POSIX system has at least 2 MiB
|
|
of stack. This is true only for glibc, but not for musl. Also, POSIX
|
|
specification only defines the absolute minimum stack size, which is 16 KiB.
|
|
|
|
Interestingly, the code hacks this on Mac OS X in a non-portable way to 2 MiB.
|
|
See line 156 in sshmasterconnection.cpp
|
|
|
|
Current QT has a (let's say) portable way to set the stack size of the new
|
|
threads. I use QT's mechanism to set the stack size to the desired 2 MiB.
|
|
----
|
|
--- a/src/onmainwindow.cpp 2020-02-13 11:36:07.000000000 +0100
|
|
+++ b/src/onmainwindow.cpp 2022-09-13 10:12:45.268906497 +0200
|
|
@@ -2894,6 +2894,7 @@
|
|
connect (con, SIGNAL(finishInteraction(SshMasterConnection*)),this, SLOT(slotSshInteractionFinish(SshMasterConnection*)));
|
|
connect ( interDlg, SIGNAL(textEntered(QString)), con, SLOT(interactionTextEnter(QString)));
|
|
connect ( interDlg, SIGNAL(interrupt()), con, SLOT(interactionInterruptSlot()));
|
|
+ con->setStackSize(2*1024*1024);
|
|
con->start();
|
|
return con;
|
|
}
|