diff options
author | Tony Cook <tony@develop-help.com> | 2012-03-24 00:27:52 +0100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2012-03-24 03:02:22 +0100 |
commit | 4dd9a80bfc60f1266dd827fe2a22e375f7deb06e (patch) | |
tree | e40eddc3e28c6956ac0c6dd95cc74e6b1b35a1b8 /t/bigmem/vec.t | |
parent | 3259dda591d8c770ec2d6eac9b182cfa16ef82af (diff) | |
download | perl-4dd9a80bfc60f1266dd827fe2a22e375f7deb06e.tar.gz |
[rt #111730] don't use I32 for offsets in vec()tonyc/vec64
do_vecset() do_vecget() used I32 for the offset, which meant that
offsets outside the -2Gb - +2Gb offset were truncated, resulting in
various misbehaviours.
size is still an I32 in each case, but that's limited to small numbers
- powers of 2 from 1 to a current maximum of 64, so I didn't see much
value to changing that.
Diffstat (limited to 't/bigmem/vec.t')
-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"); |