gdk_display_manager_get returns invalid pointer under certain circumstances
Steps to reproduce
Exact steps unknown. I found the bug when trying to debug a segmentation fault in VLC(according to people on the VLC bug tracker, it's an issue with GTK). The function call that down the line causes the segmentation fault is gtk_icon_theme_get_default
.
Current behavior
Under certain circumstances gdk_display_manager_get
returns an invalid pointer(referencing memory of another thread), which causes a segmentation fault later on, when calling gdk_display_manager_get_default_display
.
Expected outcome
gdk_display_manager_get
should return a pointer for memory allocated on the current thread's heap.
Version information
GTK version used: 3.24.1
Operating system: Arch Linux x86_64
Additional information
Backtrace when the issue happened:
(gdb) bt
#0 0x00007f794a29db00 in gdk_display_manager_get_default_display () at /usr/lib/libgdk-3.so.0
#1 0x00007f794a29dbda in gdk_screen_get_default () at /usr/lib/libgdk-3.so.0
#2 0x00007f794a56a9ea in gtk_icon_theme_get_default () at /usr/lib/libgtk-3.so.0
#3 0x00007f794ce7acb1 in ItemChange () at /home/qookie/Code/vlc/modules/.libs/libnotify_plugin.so
...
Edited by qookie