After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 697386 - Except const argument with atomic is not lock free
Except const argument with atomic is not lock free
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other OpenBSD
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 701898 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-04-05 18:26 UTC by James Turner
Modified: 2015-08-27 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
g_atomic_int_get and g_atomic_pointer_get const patch. (616 bytes, patch)
2013-04-05 18:30 UTC, James Turner
accepted-commit_now Details | Review
git format-patch (941 bytes, patch)
2013-04-05 19:35 UTC, James Turner
none Details | Review

Description James Turner 2013-04-05 18:26:24 UTC
Much like the Bug 692583 [0], which was fixed in commit cf68300d27784ab5baaf6ef4761cead0ec404b1f [1] in certain cases when glib_cvs_g_atomic_lock_free is set to no and pthread is used the function implementations of g_atomic_pointer_get and g_atomic_int_get do not match their macro counter parts.

The attached patch adds const to the function implementation in these cases.

[0] https://bugzilla.gnome.org/show_bug.cgi?id=692583
[1] https://git.gnome.org/browse/glib/patch/glib/gatomic.c?id=cf68300d27784ab5baaf6ef4761cead0ec404b1f
Comment 1 James Turner 2013-04-05 18:30:13 UTC
Created attachment 240785 [details] [review]
g_atomic_int_get and g_atomic_pointer_get const patch.

g_atomic_int_get and g_atomic_pointer_get const patch.
Comment 2 Antoine Jacoutot 2013-04-05 18:33:28 UTC
Review of attachment 240785 [details] [review]:

Yes, this looks right.
Comment 3 Allison Karlitskaya (desrt) 2013-04-05 19:24:25 UTC
Review of attachment 240785 [details] [review]:

'oops'.

Thanks for catching this.

Please add an appropriate message and commit (or if you don't have access, attach a git-format patch here and I'll push it for you).
Comment 4 James Turner 2013-04-05 19:35:11 UTC
(In reply to comment #3)
> Review of attachment 240785 [details] [review]:
> 
> 'oops'.
> 
> Thanks for catching this.
> 
> Please add an appropriate message and commit (or if you don't have access,
> attach a git-format patch here and I'll push it for you).

git format-patch attached. Hopefully I did it correctly.
Comment 5 James Turner 2013-04-05 19:35:27 UTC
Created attachment 240789 [details] [review]
git format-patch
Comment 6 Antoine Jacoutot 2013-04-06 08:43:06 UTC
Ryan, can I push this? (we already patched our glib package the same way in OpenBSD)
Comment 7 Antoine Jacoutot 2013-04-08 12:17:17 UTC
Patch pushed, aba02c5

Ryan, it seems I have no right to close tickets I don't own in BZ. Could you close it please. Thank you.
Comment 8 Allison Karlitskaya (desrt) 2013-04-08 13:13:09 UTC
Thanks.
Comment 9 Michael Catanzaro 2015-08-27 16:09:08 UTC
*** Bug 701898 has been marked as a duplicate of this bug. ***