hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zach York (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-18757) Fix Improper bitwise & in BucketCache offset calculation
Date Tue, 05 Sep 2017 16:49:00 GMT
Zach York created HBASE-18757:
---------------------------------

             Summary: Fix Improper bitwise & in BucketCache offset calculation
                 Key: HBASE-18757
                 URL: https://issues.apache.org/jira/browse/HBASE-18757
             Project: HBase
          Issue Type: Bug
          Components: BucketCache
            Reporter: Zach York
            Assignee: Zach York


Offset calculation for BucketCache entries incorrectly uses an int literal to try to ensure
that the offset is positive. However, because it uses the string literal 0xFFFFFFFF which
java uses at an int (which is negative). When it does the bitwise &, java sign extends
the int effectively undoing the original intention of the code and allowing for negative values
to slip through.
Then the read or write to that block will fail due to trying to read/write at a negative index
which causes the BucketCache to fail.



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

Mime
View raw message