Commit Graph

13 Commits

Author SHA1 Message Date
Moshe Kaplan 1b586a66df register.c: Avoid potential race condition (Coverity 1477510)
Wrap writing to cur_cb_name in a mutex, to avoid
potential race conditions.
Fixes Coverity 1477510.
2022-06-29 11:21:25 -04:00
Guy Harris 18748abb5e Fix handling of dissector registration errors.
Report all registration errors with REPORT_DISSECTOR_BUG().

In the workers for register_all_protocols() and
register_all_protocol_handlers(), use TRY/CATCH/ENDTRY to catch
DissectorError exceptions thrown by REPORT_DISSECTOR_BUG() when
registering dissectors.  Return the error message from the main thread
routine and, when joining the worker thread, if there's an error message
returned, throw it in the current thread, so that it gets caught by the
main libwireshark initialization code.

Fixes the crash in #17856.
2022-01-11 19:56:14 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Alexis La Goutte 35ceb600f9 register(epan): fix no previous prototype for function 'register_all_protocols/register_all_protocol_handoffs/register_count' [-Wmissing-prototypes]
Change-Id: Ifd95a5d3b618d8ef2c5f6f76ddc057f0f0f93492
Reviewed-on: https://code.wireshark.org/review/29405
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-05 04:10:07 +00:00
Anders bb81bef535 glib: Get rid of GLIB_CHECK_VERSION as we now require 2.32.0
Change-Id: Ie95cf37f9cd283545693e290340a7489cc989c95
Reviewed-on: https://code.wireshark.org/review/26970
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16 16:07:46 +00:00
Anders Broman 18f2b9fd2a Revert "Don't use static GMutexes."
This reverts commit ba3f29b62f.
Our minimum Glib level now supports this.

Change-Id: I55a783b7aaa1ebfce8f2870d0c24768029ced39e
Reviewed-on: https://code.wireshark.org/review/26838
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-10 03:40:49 +00:00
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
The first is deprecated, as per https://spdx.org/licenses/.

Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 14:57:36 +00:00
Stig Bjørlykke 0fda778b45 Qt: Fix splash screen "Registering dissectors" message
Adjust splash screen message used for registering dissectors when
finished fast from "Registering dissectors Registration finished"
to "Registering dissectors finished".

Change-Id: Id81cf08bb02bea0baa3ac0575b487e271641e27d
Reviewed-on: https://code.wireshark.org/review/25546
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-02 05:16:22 +00:00
Gerald Combs ba3f29b62f Don't use static GMutexes.
They're not supported in older versions of GLib.

Change-Id: I8342048bab90fb192b8d7f0253f8b3207be8c5b1
Reviewed-on: https://code.wireshark.org/review/25460
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-25 09:04:48 +00:00
Gerald Combs 15746e5922 Add a mutex for the protocol registration callback name.
Fixes TSAN warnings on macOS.

Change-Id: I6cef7b49874011fd2da2c8dd15b59ce2ae08537a
Reviewed-on: https://code.wireshark.org/review/25185
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-08 16:38:29 +00:00
Gerald Combs 67ffa3cf7d Threads: Set lifetimes and add a compatibility routine.
Join the protocol registration threads so that they call g_thread_unref
which in turn detaches/terminates the thread. This gets rid of many TSan
and DRD errors here. The remaining ones appear to be false positives.

Add g_thread_new to glib-compat (untested).

Change-Id: I4beb6746ed08656715cf7870ac63ff80cf1ef871
Reviewed-on: https://code.wireshark.org/review/24619
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-29 04:43:41 +00:00
AndersBroman 243fa8c441 [glib-compat] g_async_queue_timeout_pop() needed for older glibs
(2.31.18)

Change-Id: I727c8548c29b3409fab819dce072e86153232911
Reviewed-on: https://code.wireshark.org/review/24550
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-23 14:46:20 +00:00
João Valverde 7540ac6938 Move the protocol registration routines back into libwireshark
Follow-up to b695b3e2f7.

Change-Id: I7e36519f2c3806c1205d05437671325080974257
Reviewed-on: https://code.wireshark.org/review/24524
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-21 20:21:50 +00:00