perl-Gtk3 issueshttps://gitlab.gnome.org/GNOME/perl-gtk3/-/issues2021-02-16T23:22:09Zhttps://gitlab.gnome.org/GNOME/perl-gtk3/-/issues/8Crash on shutdown2021-02-16T23:22:09ZPascal TerjanCrash on shutdownWe had the problem in several applications over the years so it is not new.
After some analysis during the last occurrence (https://bugs.mageia.org/show_bug.cgi?id=26944), I believe the trigger is to call exit in a signal callback, with...We had the problem in several applications over the years so it is not new.
After some analysis during the last occurrence (https://bugs.mageia.org/show_bug.cgi?id=26944), I believe the trigger is to call exit in a signal callback, with at least one unrelated widget stored as global variable.
Here is the [shortest reproducer I got](/uploads/e8daad08f2b66ddeb7432a76d9d2fb6c/crash.pl) and associated [backtrace](/uploads/27d70564de7b54c4c546b3e7cf14e6f7/backtrace.txt)https://gitlab.gnome.org/GNOME/perl-gtk3/-/issues/11Test zz-GdkEvent.t segfaults with perl 5.38.02023-07-18T20:06:24ZHåkon HæglandTest zz-GdkEvent.t segfaults with perl 5.38.0Hi, I am trying to install Gtk3 on Ubuntu 22.04 with perl version 5.38.0, when running the test `t/zz-GdkEvent.t` I get a segmentation fault:
```
$ perl -Ilib t/zz-GdkEvent.t
1..146
ok 1 - 'Gtk3::Gdk::Event->new any' isa 'Gtk3::Gdk::Ev...Hi, I am trying to install Gtk3 on Ubuntu 22.04 with perl version 5.38.0, when running the test `t/zz-GdkEvent.t` I get a segmentation fault:
```
$ perl -Ilib t/zz-GdkEvent.t
1..146
ok 1 - 'Gtk3::Gdk::Event->new any' isa 'Gtk3::Gdk::Event'
ok 2 - An object of class 'Gtk3::Gdk::EventCrossing' isa 'Gtk3::Gdk::Event'
ok 3
ok 4
ok 5
ok 6
ok 7 - $event->get_screen
ok 8 - $event->get_device
[...]
ok 129 - An object of class 'Gtk3::Gdk::EventTouch' isa 'Gtk3::Gdk::EventTouch'
ok 130
ok 131
ok 132
ok 133
ok 134
ok 135
ok 136
ok 137
ok 138
ok 139
ok 140 - An object of class 'Gtk3::Gdk::EventButton' isa 'Gtk3::Gdk::EventButton'
ok 141 - An object of class 'Gtk3::Gdk::EventButton' isa 'Gtk3::Gdk::EventButton'
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 422:
https://gitlab.gnome.org/GNOME/perl-gtk3/-/blob/master/t/zz-GdkEvent.t#L422
So running this minimal program also segfaults:
```
use v5.38;
use Gtk3;
my $event = Gtk3::Gdk::Event->new ('button-press');
$event->put;
my $i_know_you = 0;
Gtk3::Gdk::Event::handler_set (sub {
return if $i_know_you++;
my ($cb_event, $data) = @_;
Gtk3::main_do_event ($cb_event);
});
$event->put;
Gtk3::main_iteration while Gtk3::events_pending;
Gtk3::Gdk::Event::handler_set (undef);
```
I ran the program with gdb to get a backtrace:
```
$ gdb -ex run --args /home/hakon/perlbrew/perls/perl-5.38.0/bin/perl -Ilib debug/event.pl
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/hakon/perlbrew/perls/perl-5.38.0/bin/perl...
(No debugging symbols found in /home/hakon/perlbrew/perls/perl-5.38.0/bin/perl)
Starting program: /home/hakon/perlbrew/perls/perl-5.38.0/bin/perl -Ilib debug/event.pl
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
(process:20025): Gdk-CRITICAL **: 21:39:17.175: gdk_display_put_event: assertion 'GDK_IS_DISPLAY (display)' failed
(process:20025): Gdk-CRITICAL **: 21:39:17.175: gdk_display_put_event: assertion 'GDK_IS_DISPLAY (display)' failed
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6a73034 in g_callable_info_get_closure_native_address () from /usr/lib/x86_64-linux-gnu/libgirepository-1.0.so.1
(gdb) bt
#0 0x00007ffff6a73034 in g_callable_info_get_closure_native_address () at /usr/lib/x86_64-linux-gnu/libgirepository-1.0.so.1
#1 0x00007ffff6a94fdb in sv_to_interface () at /home/hakon/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/x86_64-linux/auto/Glib/Object/Introspection/Introspection.so
#2 0x00007ffff6a9691e in invoke_c_code.constprop ()
at /home/hakon/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/x86_64-linux/auto/Glib/Object/Introspection/Introspection.so
#3 0x00007ffff6a978aa in XS_Glib__Object__Introspection_invoke ()
at /home/hakon/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/x86_64-linux/auto/Glib/Object/Introspection/Introspection.so
#4 0x00005555556863c4 in Perl_pp_entersub ()
#5 0x000055555567c903 in Perl_runops_standard ()
#6 0x00005555555c1eb7 in perl_run ()
#7 0x000055555559b272 in main ()
```https://gitlab.gnome.org/GNOME/perl-gtk3/-/issues/10Test overrides.t segfaults with perl 5.382023-07-18T20:06:24ZHåkon HæglandTest overrides.t segfaults with perl 5.38Hi, 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...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.https://gitlab.gnome.org/GNOME/perl-gtk3/-/issues/9Gtk3-0.038 test suite produces failures2021-03-19T12:46:24ZsisyphusGtk3-0.038 test suite produces failuresI'll post this anyway - even though I've now found a workaround to the problem.
That workaround is to place <code>use blib;</code> at the very beginning of t/inc/setup.pl.
I think I have an idea of why that works, but I have no idea why ...I'll post this anyway - even though I've now found a workaround to the problem.
That workaround is to place <code>use blib;</code> at the very beginning of t/inc/setup.pl.
I think I have an idea of why that works, but I have no idea why the absence of that <code>use blib;</code> should produce the failures that it does.
Read on, if you're curious:
When I run 'make test' on perl-5.32.0 (on Windows 7) I get a large number of failures.
Here's the report summary:
```
Test Summary Report
-------------------
t/floating-refs.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/overrides.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/signals.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/vfuncs-destroy.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GdkEvent.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkActionGroup.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkBuilder.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkCellLayoutIface.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkCellRendererIface.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkContainer.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkDialog.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkImage.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkInfoBar.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkRadioAction.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkRadioButton.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkRadioMenuItem.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkRadioToolButton.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkRecentChooserDialog.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkTextBuffer.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/zz-GtkTreeModelIface.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
Files=22, Tests=17, 10 wallclock secs ( 0.06 usr + 0.08 sys = 0.14 CPU)
Result: FAIL
Failed 20/22 test programs. 0/17 subtests failed.
```
However, I can successfully run at least some (probably all) of those test programs as 'perl -Mblib t/filename.t'.
Let's take t/overrides.t, which is second on the list, as an example.
When I scroll back to view the output that occurred when 'make test' ran t/overrides.t, I can see:
```
Win32 version 0.27 required--this is only version 0 at C:/perl-5.32.0/lib/MSWin32-x64-multi-thread-ld/Cwd.pm line 605.
BEGIN failed--compilation aborted.
Compilation failed in require at t/overrides.t line 3.
BEGIN failed--compilation aborted at t/overrides.t line 3.
t/overrides.t ..................
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
```
Yet when I run 'perl -Mblib t/overrides.t' I get:
```
1..233
# Gtk3::CHECK_VERSION and check_version
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
# Gtk3::Window::new and list_toplevels.
# This is at the top to avoid testing against a polluted list of toplevels.
ok 9
ok 10
# Gtk3::show_about_dialog
ok 11
# Gtk3::[HV]Box
ok 12
ok 13
ok 14
ok 15
# Gtk3::Button::new
ok 16
ok 17
# Gtk3::CellLayout::get_cells
ok 18
ok 19
# Gtk3::CheckButton::new
ok 20
ok 21
# Gtk3::Clipboard::set_text
ok 22
ok 23
# Gtk3::ColorButton::new
ok 24
ok 25
# Gtk3::CssProvider
ok 26
ok 27
# Gtk3::Editable::insert_text
ok 28
ok 29
ok 30
# Gtk3::Editable::insert_text and length issues
ok 31
ok 32
# GtkEditable.insert-text signal
ok 33
ok 34
ok 35
ok 36
ok 37
# Gtk3::FileChooserDialog
ok 38
ok 39
ok 40
# Gtk3::FontButton::new
ok 41
# Gtk3::LinkButton::new
ok 42
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'
# Gtk2::MenuItem::new, Gtk2::CheckMenuItem::new, Gtk2::ImageMenuItem::new
ok 56 - An object of class 'Gtk3::MenuItem' isa 'Gtk3::MenuItem'
ok 57
ok 58 - An object of class 'Gtk3::MenuItem' isa 'Gtk3::MenuItem'
ok 59
ok 60 - An object of class 'Gtk3::MenuItem' isa 'Gtk3::MenuItem'
ok 61
ok 62 - An object of class 'Gtk3::CheckMenuItem' isa 'Gtk3::CheckMenuItem'
ok 63
ok 64 - An object of class 'Gtk3::CheckMenuItem' isa 'Gtk3::CheckMenuItem'
ok 65
ok 66 - An object of class 'Gtk3::CheckMenuItem' isa 'Gtk3::CheckMenuItem'
ok 67
ok 68 - An object of class 'Gtk3::ImageMenuItem' isa 'Gtk3::ImageMenuItem'
ok 69
ok 70 - An object of class 'Gtk3::ImageMenuItem' isa 'Gtk3::ImageMenuItem'
ok 71
ok 72 - An object of class 'Gtk3::ImageMenuItem' isa 'Gtk3::ImageMenuItem'
ok 73
# Gtk3::SizeGroup
ok 74
ok 75
# Gtk3::Stock
ok 76
ok 77
# Gtk3::Stock::add and add_static do not work yet
# Gtk3::StyleContext::get
ok 78 - two items returned
# Gtk3::TargetEntry
ok 79 - convert_sv_to_flags
ok 80 - Gtk3::TargetFlags->new
ok 81 - override
# Gtk3::ToggleButton::new
ok 82
ok 83
# Gtk3::TreeStore::new, set and get, insert_with_values
ok 84
ok 85
ok 86
ok 87
ok 88
ok 89
ok 90
ok 91
ok 92
ok 93
# Gtk3::TreePath::new, new_from_string, new_from_indices, get_indices
ok 94 - An object of class 'Gtk3::TreePath' isa 'Gtk3::TreePath'
ok 95
ok 96
ok 97
# Gtk3::TreeModel::get_iter, get_iter_first, get_iter_from_string
ok 98
ok 99
ok 100
ok 101 - An object of class 'Gtk3::TreeIter' isa 'Gtk3::TreeIter'
ok 102 - An object of class 'Gtk3::TreeIter' isa 'Gtk3::TreeIter'
ok 103 - An object of class 'Gtk3::TreeIter' isa 'Gtk3::TreeIter'
# Gtk3::TreeModel::iter_children, iter_nth_child, iter_parent
ok 104
ok 105
ok 106
ok 107 - An object of class 'Gtk3::TreeIter' isa 'Gtk3::TreeIter'
ok 108 - An object of class 'Gtk3::TreeIter' isa 'Gtk3::TreeIter'
ok 109 - An object of class 'Gtk3::TreeIter' isa 'Gtk3::TreeIter'
# Gtk3::TreeModelFilter
ok 110 - An object of class 'Gtk3::TreeModelFilter' isa 'Gtk3::TreeModelFilter'
ok 111 - An object of class 'Gtk3::TreeIter' isa 'Gtk3::TreeIter'
ok 112
# Gtk3::TreeModelSort
ok 113 - An object of class 'Gtk3::TreeModelSort' isa 'Gtk3::TreeModelSort'
ok 114 - An object of class 'Gtk3::TreeIter' isa 'Gtk3::TreeIter'
ok 115
# Gtk3::TreeSelection::get_selected
ok 116
ok 117 - An object of class 'Gtk3::TreeIter' isa 'Gtk3::TreeIter'
ok 118 - An object of class 'Gtk3::TreeIter' isa 'Gtk3::TreeIter'
# Gtk3::TreeView::insert_column_with_attributes, get_dest_row_at_pos,
# get_path_at_pos, get_tooltip_context, get_visible_range
ok 119
ok 120
ok 121
ok 122
ok 123
# Gtk3::TreeViewColumn::new_with_attributes, set_attributes
# cell_get_position
ok 124
ok 125
# Gtk3::UIManager
ok 126
ok 127
ok 128
ok 129 - An object of class 'Gtk3::MenuBar' isa 'Gtk3::MenuBar'
ok 130 - An object of class 'Gtk3::MenuBar' isa 'Gtk3::MenuBar'
# Gtk3::Widget
ok 131 - An object of class 'Gtk3::Gdk::Pixbuf' isa 'Gtk3::Gdk::Pixbuf'
ok 132
ok 133
ok 134 - An object of class 'Glib::Param::Float' isa 'Glib::ParamSpec'
ok 135
ok 136 - An object of class 'Glib::Param::Float' isa 'Glib::ParamSpec'
ok 137 - find_style_property() no such name, on object
ok 138 - find_style_property() no such name, on class
ok 139 - An object of class 'Glib::Param::Boolean' isa 'Glib::ParamSpec'
ok 140 - An object of class 'Glib::Param::Boolean' isa 'Glib::ParamSpec'
ok 141 - $widget->set_events|get_events
ok 142 - $widget->add_events|get_events
ok 143 - $widget->set_events|get_events with numeric 0
ok 144 - $widget->set_events|get_events with numeric 0
ok 145 - $widget->add_events|get_events with numeric 24
ok 146 - $widget->add_events|get_events with numeric 24
# Gtk3::Gdk::Atom
ok 147
ok 148
# Gtk3::Gdk::RGBA
ok 149 - An object of class 'Gtk3::Gdk::RGBA' isa 'Gtk3::Gdk::RGBA'
ok 150
ok 151 - An object of class 'Gtk3::Gdk::RGBA' isa 'Gtk3::Gdk::RGBA'
ok 152
ok 153 - An object of class 'Gtk3::Gdk::RGBA' isa 'Gtk3::Gdk::RGBA'
ok 154
ok 155 - An object of class 'Gtk3::Gdk::RGBA' isa 'Gtk3::Gdk::RGBA'
ok 156
ok 157
ok 158
# Gtk3::Gdk::Window::new
ok 159 - An object of class 'Glib::Object::_Unregistered::GdkWin32Window' isa 'Gtk3::Gdk::Window'
ok 160 - An object of class 'Glib::Object::_Unregistered::GdkWin32Window' isa 'Gtk3::Gdk::Window'
ok 161 - An object of class 'Glib::Object::_Unregistered::GdkWin32Window' isa 'Gtk3::Gdk::Window'
# Gtk3::Gdk::Pixbuf::get_formats
ok 162 - An object of class 'Gtk3::Gdk::PixbufFormat' isa 'Gtk3::Gdk::PixbufFormat'
# Gtk3::Gdk::Pixbuf::new_from_data
ok 163 - An object of class 'Gtk3::Gdk::Pixbuf' isa 'Gtk3::Gdk::Pixbuf'
ok 164
ok 165
ok 166
ok 167
ok 168
ok 169
ok 170
ok 171 - An object of class 'Gtk3::Gdk::Pixbuf' isa 'Gtk3::Gdk::Pixbuf'
ok 172
ok 173
ok 174
ok 175
ok 176
ok 177
ok 178
# Gtk3::Gdk::Pixbuf::new_from_xpm_data
ok 179 - An object of class 'Gtk3::Gdk::Pixbuf' isa 'Gtk3::Gdk::Pixbuf'
ok 180
ok 181
ok 182
ok 183
ok 184
ok 185
ok 186
ok 187 - An object of class 'Gtk3::Gdk::Pixbuf' isa 'Gtk3::Gdk::Pixbuf'
ok 188
ok 189
ok 190
ok 191
ok 192
ok 193
ok 194
# Gtk3::Gdk::Pixbuf::new_from_inline
ok 195 - An object of class 'Gtk3::Gdk::Pixbuf' isa 'Gtk3::Gdk::Pixbuf'
ok 196
ok 197
ok 198
ok 199
ok 200
ok 201
ok 202
ok 203 - An object of class 'Gtk3::Gdk::Pixbuf' isa 'Gtk3::Gdk::Pixbuf'
ok 204
ok 205
ok 206
ok 207
ok 208
ok 209
ok 210
# Gtk3::Gdk::Pixbuf::save, save_to_buffer, save_to_callback
ok 211
ok 212 - 'new_from_file' isa 'Gtk3::Gdk::Pixbuf'
ok 213
ok 214
ok 215
ok 216
ok 217
ok 218 - save_to_buffer
ok 219
ok 220
ok 221
ok 222
ok 223
ok 224
ok 225
ok 226
ok 227
ok 228 - An object of class 'Gtk3::Gdk::PixbufError' isa 'Glib::Error'
ok 229
# Pango::Layout
ok 230
ok 231
ok 232
ok 233
```
Can someone explain to me just what is going on ? (In case it's relevant, I saw similar failures when I built Gtk2.)
The error seems to stem from line 3 of t/overrides.t, which is:
```
BEGIN { require './t/inc/setup.pl' };
```
I can reproduce the error (outside of the test harness) by running:
```
C:\Users\sisyphus\.cpan\build\Gtk3-0.038-0>perl -e "BEGIN { require './t/inc/setup.pl' };"
Win32 version 0.27 required--this is only version 0 at C:/perl-5.32.0/lib/MSWin32-x64-multi-thread-ld/Cwd.pm line 605.
BEGIN failed--compilation aborted.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
C:\Users\sisyphus\.cpan\build\Gtk3-0.038-0>
```
But if I load blib, then the error vanishes:
```
C:\Users\sisyphus\.cpan\build\Gtk3-0.038-0>perl -Mblib -e "BEGIN { require './t/inc/setup.pl' };"
C:\Users\sisyphus\.cpan\build\Gtk3-0.038-0>
```
For additional context, here is line 605 (and surrounds) of Cwd.pm:
```
sub _win32_cwd {
my $pwd;
$pwd = Win32::GetCwd(); # line 605
$pwd =~ s:\\:/:g ;
$ENV{'PWD'} = $pwd;
return $pwd;
}
```
Win32::GetCwd() seems to function correctly, and my "Win32 version" is:
```
C:\Users\sisyphus\.cpan\build\Gtk3-0.038-0>perl -MWin32 -le "print $Win32::VERSION;"
0.53
C:\Users\sisyphus\.cpan\build\Gtk3-0.038-0>
```