Test overrides.t segfaults with perl 5.38
Hi, I am trying to install Gtk3 on Ubuntu 22.04 with perl version 5.38.0:
$ perl -Ilib t/overrides.t
1..233
# Gtk3::CHECK_VERSION and check_version
ok 1
ok 2
[...]
ok 43
# Gtk3::ListStore::new, set and get, insert_with_values
ok 44
ok 45
ok 46
ok 47
ok 48
ok 49
ok 50
ok 51
ok 52
ok 53
# Gtk3::Menu::popup and popup_for_device
ok 54 - An object of class 'Gtk3::Menu' isa 'Gtk3::Menu'
ok 55 - An object of class 'Gtk3::Menu' isa 'Gtk3::Menu'
Segmentation fault (core dumped)
Running the same test with perl version 5.34.1 gives no segmentation fault.
I think I have reduced the problem down to line 270:
https://gitlab.gnome.org/GNOME/perl-gtk3/-/blob/master/t/overrides.t#L270
So running this minimal program also segfaults:
use v5.38;
use Gtk3;
if (!Gtk3::init_check ()) {
die 'Gtk3::init_check failed';
}
say "Gtk version: ", Gtk3::GET_VERSION_INFO();
my $menu = Gtk3::Menu->new;
$menu->popup (undef, undef, undef, undef, 1, 0);
The output is:
Gtk version: 32433
Segmentation fault (core dumped)
I tried to run it with gdb
to get a backtrace, but then gdb crashed my machine (such that it became in responsive to keyboard events and mouse clicks) and I needed to reboot to continue. The crash happened immediately after gdb had showed the segfault message, so unfortunately I could not get the backtrace.
Edited by Håkon Hægland