diff options
author | Tony Cook <tony@develop-help.com> | 2012-03-24 00:27:52 +0100 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-05-21 17:51:53 -0700 |
commit | fcb8da00bbf96c055c5bfb9ae7a8086051c6f3b0 (patch) | |
tree | 3e421dfcf21ae11f9cbec090dc0d29ee37974264 /t/bigmem | |
parent | 803e7e8145a1acab70f0b5356329b191cfc8ccd9 (diff) | |
download | perl-fcb8da00bbf96c055c5bfb9ae7a8086051c6f3b0.tar.gz |
[rt #111730] don't use I32 for offsets in vec()
do_vecset() do_vecget() used I32 for the offset, which meant that
offsets outside the -2Gb - +2Gb offset were truncated, resulting in
various misbehaviours.
Diffstat (limited to 't/bigmem')
-rw-r--r-- | t/bigmem/vec.t | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/t/bigmem/vec.t b/t/bigmem/vec.t index ccdbb9bc43..bf3c513f63 100644 --- a/t/bigmem/vec.t +++ b/t/bigmem/vec.t @@ -16,12 +16,11 @@ $Config{ptrsize} >= 8 plan(7); # RT #111730: Negative offset to vec in lvalue context -local $::TODO = "RT #111730 - vec uses I32 for offsets"; my $v = ""; ok(scalar eval { vec($v, 0x80000000, 1) = 1 }, "set a bit at a large offset"); ok(vec($v, 0x80000000, 1), "check a bit at a large offset"); -{ local $::TODO; # succeeds but shouldn't at this point + ok(scalar eval { vec($v, 0x100000000, 1) = 1 }, "set a bit at a larger offset"); ok(vec($v, 0x100000000, 1), "check a bit at a larger offset"); @@ -29,7 +28,6 @@ ok(vec($v, 0x100000000, 1), "check a bit at a larger offset"); # real out of range values ok(!eval { vec($v, -0x80000000, 1) = 1 }, "shouldn't be able to set at a large negative offset"); -} ok(!eval { vec($v, -0x100000000, 1) = 1 }, "shouldn't be able to set at a larger negative offset"); |