diff options
Diffstat (limited to 't')
-rw-r--r-- | t/run/switchd.t | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/t/run/switchd.t b/t/run/switchd.t index f901bf620e..68a97d635c 100644 --- a/t/run/switchd.t +++ b/t/run/switchd.t @@ -9,7 +9,7 @@ BEGIN { require "./test.pl"; } # This test depends on t/lib/Devel/switchd*.pm. -plan(tests => 17); +plan(tests => 18); my $r; @@ -253,3 +253,20 @@ is( "ok\n", "setting breakpoints without *DB::dbline aliased" ); + +# Test setting breakpoints after overwriting source lines +is( + runperl( + switches => [ '-Ilib', '-d:switchd_empty' ], + progs => [ split "\n", + '*DB::dbline = *{q(_<).__FILE__}; + $DB::dbline[1] = 7; # IVX used to point to the cop address + $DB::dbline{1} = 1; # crash accessing cCOPx(7)->op_flags + print qq[ok\n]; + ' + ], + stderr => 1 + ), + "ok\n", + 'no crash when setting $DB::dbline{1} after $DB::dbline[1]' +); |