You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Martin Tzvetanov Grigorov (Jira)" <ji...@apache.org> on 2024/06/25 10:01:00 UTC
[jira] [Updated] (AVRO-1523) Perl API: int/long type minimum value checks are off by one
[ https://issues.apache.org/jira/browse/AVRO-1523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Tzvetanov Grigorov updated AVRO-1523:
--------------------------------------------
Fix Version/s: 1.12.0
(was: 1.9.0)
Assignee: José Joaquín Atria (was: John Karp)
Resolution: Fixed
Status: Resolved (was: Patch Available)
> Perl API: int/long type minimum value checks are off by one
> -----------------------------------------------------------
>
> Key: AVRO-1523
> URL: https://issues.apache.org/jira/browse/AVRO-1523
> Project: Apache Avro
> Issue Type: Bug
> Components: perl
> Reporter: John Karp
> Assignee: José Joaquín Atria
> Priority: Minor
> Fix For: 1.12.0
>
> Attachments: AVRO-1523.patch
>
>
> -2,147,483,648 is rejected as an int, and −9,223,372,036,854,775,808 is rejected as a long when passed to the binary encoder, but they are valid signed 32-bit and 64-bit numbers respectively.
> The problem is that the range check is made against the absolute value of the input, but in two's complement arithmetic types the minimum and maximum values have different absolute values.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)