beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BEAM-2805) Potential arithmetic overflow in Generator#nextAuctionLengthMs()
Date Sun, 17 Sep 2017 14:24:00 GMT

     [ https://issues.apache.org/jira/browse/BEAM-2805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ted Yu updated BEAM-2805:
-------------------------
    Description: 
{code}
    long numEventsForAuctions =
        (config.configuration.numInFlightAuctions * GeneratorConfig.PROPORTION_DENOMINATOR)
        / GeneratorConfig.AUCTION_PROPORTION;
{code}
The multiplication is done on 32-bit integers while long is expected (numEventsForAuctions).

There is possibility for arithmetic overflow

  was:
{code}
    long numEventsForAuctions =
        (config.configuration.numInFlightAuctions * GeneratorConfig.PROPORTION_DENOMINATOR)
        / GeneratorConfig.AUCTION_PROPORTION;
{code}

The multiplication is done on 32-bit integers while long is expected (numEventsForAuctions).

There is possibility for arithmetic overflow


> Potential arithmetic overflow in Generator#nextAuctionLengthMs()
> ----------------------------------------------------------------
>
>                 Key: BEAM-2805
>                 URL: https://issues.apache.org/jira/browse/BEAM-2805
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-extensions
>            Reporter: Ted Yu
>            Assignee: Reuven Lax
>            Priority: Minor
>
> {code}
>     long numEventsForAuctions =
>         (config.configuration.numInFlightAuctions * GeneratorConfig.PROPORTION_DENOMINATOR)
>         / GeneratorConfig.AUCTION_PROPORTION;
> {code}
> The multiplication is done on 32-bit integers while long is expected (numEventsForAuctions).
> There is possibility for arithmetic overflow



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message