diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-01-17 15:13:52 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-01-17 15:47:28 (GMT) |
commit | 4fb5c42ede2b33c3092d70aa3e32cf6c677bd4d8 (patch) | |
tree | d96c7aa1c882619e75cb2a85a7a67d73d601c424 /src/network/socket/qsymbiansocketengine_p.h | |
parent | b1477e557681372d2c7119d637048123f0bad120 (diff) | |
download | Qt-4fb5c42ede2b33c3092d70aa3e32cf6c677bd4d8.zip Qt-4fb5c42ede2b33c3092d70aa3e32cf6c677bd4d8.tar.gz Qt-4fb5c42ede2b33c3092d70aa3e32cf6c677bd4d8.tar.bz2 |
Fix uncaught exception crash when socket ready read signal throws
When the application (in this case, an autotest) ran out of memory by
calling readAll() in a slot, the exception propagated to the symbian
active scheduler where it caused an assertion failure.
Additionally, QAbstractSocket was left in a bad state because its
member variables that guard against re-entrancy were left set.
1. Catch exceptions and convert to leaves in QAsyncSelect
2. Implement RunError function to set the socket engine error state
3. Use QScopedValueRollback in QAbstractSocket to ensure the reentrancy
guards are reverted if an exception is thrown.
Reviewed-by: Markus Goetz
Reviewed-by: mread
Diffstat (limited to 'src/network/socket/qsymbiansocketengine_p.h')
-rw-r--r-- | src/network/socket/qsymbiansocketengine_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/socket/qsymbiansocketengine_p.h b/src/network/socket/qsymbiansocketengine_p.h index bc85f9c..f36b7dd 100644 --- a/src/network/socket/qsymbiansocketengine_p.h +++ b/src/network/socket/qsymbiansocketengine_p.h @@ -72,6 +72,7 @@ class QNetworkInterface; class Q_AUTOTEST_EXPORT QSymbianSocketEngine : public QAbstractSocketEngine { Q_OBJECT + friend class QAsyncSelect; public: QSymbianSocketEngine(QObject *parent = 0); ~QSymbianSocketEngine(); @@ -167,6 +168,8 @@ public: protected: void DoCancel(); void RunL(); + void run(); + TInt RunError(TInt aError); private: QReadNotifier* iReadN; |