Summary: | Konsole crashes when selecting invalid unicode character. | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Thomas Lindroth <thomas.lindroth> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | francesco.cecconi |
Priority: | NOR | Keywords: | reproducible |
Version: | 2.8.3 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/konsole/4ce0647eaae3cc1e486955232e9dc52c43538233 | Version Fixed In: | 4.8.5 |
Description
Thomas Lindroth
2012-07-11 21:47:35 UTC
Thanks for the report! I can reproduce it using 2.8.3 and 2.9.999. No need to recompile your Qt :) That's nice... on MacOSX use base64 -D konsole(99607,0x7fff7acd8960) malloc: *** mmap(size=18446744071562072064) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug Qt has caught an exception thrown from an event handler. Throwing exceptions from an event handler is not supported in Qt. You must reimplement QApplication::notify() and catch all exceptions there. terminate called throwing an exception Program received signal SIGABRT, Aborted. 0x00007fff905fdce2 in __pthread_kill () (gdb) (gdb) (gdb) (gdb) bt #0 0x00007fff905fdce2 in __pthread_kill () #1 0x00007fff918eb7d2 in pthread_kill () #2 0x00007fff918dca7a in abort () #3 0x00007fff956ce7bc in abort_message () #4 0x00007fff956cbfcf in default_terminate () #5 0x00007fff8c2ac1cd in _objc_terminate () #6 0x00007fff956cc001 in safe_handler_caller () #7 0x00007fff956cc05c in std::terminate () #8 0x00007fff956cd1e9 in __cxa_rethrow () #9 0x0000000101319f1d in QEventLoop::exec () #10 0x000000010131d163 in QCoreApplication::exec () #11 0x0000000100012ada in kdemain (argc=<value temporarily unavailable, due to optimizations>, argv=<value temporarily unavailable, due to optimizations>) at /Volumes/OWC500GB/Projects/KDE/kde4/trunk/src/kde/kde-baseapps/konsole/src/main.cpp:85 #12 0x0000000100004ee4 in start () The loop at http://lxr.kde.org/source/kde/kde-baseapps/konsole/src/TerminalCharacterDecoder.cpp#110 txs to PovAddict on IRC Git commit 5ae5bc5019ec67df0846b2b317c02535bce5870f by Kurt Hindenburg. Committed on 12/07/2012 at 15:25. Pushed by hindenburg into branch 'master'. prevent crashing when selecting invalid unicode character. Konsole goes into an infinite loop and will eventually crash due to memory. On an invalid unicode char the width is 0 so the for loop never exits. This should prevent the crashes; not sure if there is a better way. M +7 -1 src/TerminalCharacterDecoder.cpp http://commits.kde.org/konsole/5ae5bc5019ec67df0846b2b317c02535bce5870f Git commit f04bd15bbe15bee12c33c12aa252d3c4df8b9984 by Kurt Hindenburg. Committed on 12/07/2012 at 15:25. Pushed by hindenburg into branch 'KDE/4.8'. prevent crashing when selecting invalid unicode character. Konsole goes into an infinite loop and will eventually crash due to memory. On an invalid unicode char the width is 0 so the for loop never exits. This should prevent the crashes; not sure if there is a better way. (cherry picked from commit 5ae5bc5019ec67df0846b2b317c02535bce5870f) M +7 -1 src/TerminalCharacterDecoder.cpp http://commits.kde.org/konsole/f04bd15bbe15bee12c33c12aa252d3c4df8b9984 Another option could be to use qMax for increment i. if (chars) { const QString s = QString::fromUtf16(chars, extendedCharLength); plainText.append(s); i += qMax(1, string_width(s)); } Git commit 69b53c00ae53d6a066292d3f1a96599a75eff618 by Kurt Hindenburg. Committed on 20/07/2012 at 04:34. Pushed by hindenburg into branch 'master'. prevent crashing when selecting invalid unicode character. Konsole goes into an infinite loop and will eventually crash due to memory. On an invalid unicode char the width is 0 so the for loop never exits. A better patch by Francesco Cecconi <francesco.cecconi@gmail.com> M +1 -6 src/TerminalCharacterDecoder.cpp http://commits.kde.org/konsole/69b53c00ae53d6a066292d3f1a96599a75eff618 Git commit 4ce0647eaae3cc1e486955232e9dc52c43538233 by Kurt Hindenburg. Committed on 20/07/2012 at 04:34. Pushed by hindenburg into branch 'KDE/4.8'. prevent crashing when selecting invalid unicode character. Konsole goes into an infinite loop and will eventually crash due to memory. On an invalid unicode char the width is 0 so the for loop never exits. A better patch by Francesco Cecconi <francesco.cecconi@gmail.com> (cherry picked from commit 69b53c00ae53d6a066292d3f1a96599a75eff618) M +1 -6 src/TerminalCharacterDecoder.cpp http://commits.kde.org/konsole/4ce0647eaae3cc1e486955232e9dc52c43538233 Git commit 6a13493a0b14956b5ef332653f71551016756d6e by Jekyll Wu. Committed on 20/07/2012 at 04:56. Pushed by jekyllwu into branch 'KDE/4.9'. prevent crashing when selecting invalid unicode character. Konsole goes into an infinite loop and will eventually crash due to memory. On an invalid unicode char the width is 0 so the for loop never exits. A better patch by Francesco Cecconi <francesco.cecconi@gmail.com> (cherry picked from commit 69b53c00ae53d6a066292d3f1a96599a75eff618) M +1 -1 src/TerminalCharacterDecoder.cpp http://commits.kde.org/konsole/6a13493a0b14956b5ef332653f71551016756d6e |