Wireshark-bugs: [Wireshark-bugs] [Bug 11833] New: QT UI SIGSEGV before main() in initializer for
Bug ID |
11833
|
Summary |
QT UI SIGSEGV before main() in initializer for colors_
|
Product |
Wireshark
|
Version |
2.0.0
|
Hardware |
x86-64
|
OS |
Linux (other)
|
Status |
UNCONFIRMED
|
Severity |
Major
|
Priority |
Low
|
Component |
Qt UI
|
Assignee |
bugzilla-admin@wireshark.org
|
Reporter |
bugs-a13@moonlit-rail.com
|
Build Information:
Wireshark 2.0.0 (SVN Rev Unknown from unknown)
Copyright 1998-2015 Gerald Combs <gerald@wireshark.org> and contributors.
License GPLv2+: GNU GPL version 2 or later
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled (64-bit) with Qt 4.8.7, with libpcap, with POSIX capabilities (Linux),
with libnl 3, with libz 1.2.8, with GLib 2.46.2, without SMI, without c-ares,
without ADNS, with Lua 5.1, with GnuTLS 3.4.7, with Gcrypt 1.6.4, with MIT
Kerberos, without GeoIP, with QtMultimedia, without AirPcap.
Running on Linux 4.2.6, with locale C, with libpcap version 1.7.4, with libz
1.2.8, with GnuTLS 3.4.7, with Gcrypt 1.6.4.
Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (with SSE4.2)
Built using gcc 5.2.0.
--
The QT version of Wireshark 2.0.0 segfaults before main() is called.
The GTK version, /usr/bin/wireshark-gtk, works normally.
Recompiling with CFLAGS=-g and running gdb, I narrowed the problem down to line
82 in ui/qt/io_graph_dialog.cpp:
QList<QRgb> colors_ = ColorUtils::graph_colors_;
The initializer, ColorUtils::graph_colors_, is defined as a constant in
ui/qt/color_utils.cpp and as a static constant in color_utils.h. I'm not a C++
programmer, so the subtlety is probably lost on me there. :-)
As an experiment, I patched ui/qt/io_graph_dialog.cpp and replaced
"ColorUtils::graph_colors_" on line 82 with its definition from
color_utils.cpp, like this:
QList<QRgb> colors_ = QList<QRgb>()
<< tango_aluminium_6 // Bar outline (use black instead)?
<< tango_sky_blue_5
<< tango_butter_6
... and so on;
Recompiled, and... success! No segfault!
Maybe moot now, but here's the gdb backtrace from the unpatched wireshark,
showing the SEGV in the initializer:
#0 0x0000000000463e18 in QBasicAtomicInt::ref() (this=0x0)
at /usr/lib64/qt/include/QtCore/qatomic_x86_64.h:121
#1 0x0000000000465b27 in QList<unsigned int>::QList(QList<unsigned int>
const&) (this=0xc71ce0 <colors_>, l=...) at
/usr/lib64/qt/include/QtCore/qlist.h:122
#2 0x00000000005932c8 in __static_initialization_and_destruction_0(int, int)
(__initialize_p=1, __priority=65535) at io_graph_dialog.cpp:82
#3 0x0000000000593373 in _GLOBAL__sub_I_colors_() () at
io_graph_dialog.cpp:2319
#4 0x0000000000783dd6 in __do_global_ctors_aux ()
#5 0x00007ffff1c8ee40 in () at /usr/lib64/libQtMultimedia.so.4
#6 0x0000000000000000 in ()
You are receiving this mail because:
- You are watching all bug changes.