glib/gobject/tests
Marco Trevisan (Treviño) 468246bb3b gobject: Ensure an object has toggle references before notifying it
When an object with toggle reference is notifying a change we just
assume that this is true because of previous checks.
However, while locking, another thread may have removed the toggle
reference causing the waiting thread to abort (as no handler is set at
that point).

To avoid this, once we've got the toggle references mutex lock, check
again if the object has toggle reference, and if it's not the case
anymore just ignore the request.

Add a test that triggers this, it's not 100% happening because this is
of course timing related, but this is very close to the truth.

Fixes: #2394
2021-09-20 17:56:25 +02:00
..
.gitignore .gitignore updates 2015-10-23 11:28:03 -04:00
autoptr.c tests: Add some assertions to avoid unused variable warnings on Clang 2020-02-24 16:18:58 +00:00
binding.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
boxed.c boxed: Register GPatternSpec as boxed type 2021-04-27 16:25:09 +02:00
closure-refcount.c tests: Fix closure-refcount to preserve old semantics 2019-02-28 07:05:29 +01:00
closure.c Fix the closure test in continuous 2014-05-30 10:22:35 -04:00
dynamictests.c Fix missing initializer warning in gobject/tests/dynamictests.c:test_module_get_type() 2020-12-16 10:56:32 +01:00
enums.c gobject: Add to_string() functions for Enum and Flags types 2017-03-30 09:52:28 +01:00
flags.c Add unit test for flags validation 2018-11-01 01:41:32 +03:00
genmarshal.py py: Various flake8 cleanups 2020-11-17 15:50:07 +00:00
ifaceproperties.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
marshalers.list Add more tests for signal emissions 2012-03-02 17:13:04 +01:00
meson.build Add unit for the "final" GType flag 2021-07-27 12:27:53 +01:00
mkenums.py glib-mkenums: Parse and skip deprecation/availability annotations 2021-03-11 13:37:49 +00:00
object.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
param.c gobject/tests/param: Fix a memory leak 2021-07-23 22:21:33 +02:00
private.c glib: Avoid redefining GLIB_DISABLE_DEPRECATION_WARNINGS 2020-07-27 15:41:09 +01:00
properties.c tests: Drop use of g_test_bug_base() 2021-05-13 22:16:27 +01:00
qdata.c tests: Drop unnecessary volatile qualifiers from tests 2020-11-20 14:40:19 +00:00
reference.c gobject: Cleanup weak locations data as part of dispose 2021-09-17 12:28:01 +02:00
signal-handler.c Add a performance test for signal connection 2015-05-27 14:41:19 -04:00
signals.c gsignal: Allow return types for RUN_FIRST-only signals too 2020-12-21 17:22:51 +00:00
taptestrunner.py py: Various flake8 cleanups 2020-11-17 15:50:07 +00:00
testcommon.h Fix missing initializer warning in gobject/tests/ifaceproperties.c:base_object_get_type() 2020-12-16 23:59:17 +01:00
testing.c tests: Add a test for g_assert_finalize_object() 2019-10-18 15:55:27 +01:00
threadtests.c gobject: Ensure an object has toggle references before notifying it 2021-09-20 17:56:25 +02:00
type-flags.c Add unit for the "final" GType flag 2021-07-27 12:27:53 +01:00
type.c gtype: Add g_type_interface_instantiatable_prerequisite() 2020-11-02 17:36:18 +00:00
value.c Fix signedness warnings in gobject/tests/value.c:test_valuearray_basic() 2020-12-05 17:11:55 +01:00