RFR 8164632: Node indices should be treated as unsigned integers

Hohensee, Paul hohensee at amazon.com
Thu Aug 13 21:51:39 UTC 2020


Shouldn't all the uint type uses that represent node indices actually be node_idx_t?

Thanks,
Paul

On 8/13/20, 12:34 AM, "hotspot-compiler-dev on behalf of Tobias Hartmann" <hotspot-compiler-dev-retn at openjdk.java.net on behalf of tobias.hartmann at oracle.com> wrote:

    Hi Eric,

    there are other places where Node::_idx is casted to int (and a potential overflow might happen).
    For example, calls to Compile::node_notes_at.

    The purpose of this RFE was to replace all Node::_idx uint -> int casts and consistently use uint
    for the node index. If that's not feasible, we should at least add a guarantee (not only an assert)
    checking that _idx is always <= MAX_INT.

    Best regards,
    Tobias

    On 12.08.20 00:41, Eric, Chan wrote:
    > Hi,
    >
    > Requesting review for
    >
    > Webrev : http://cr.openjdk.java.net/~xliu/eric/8164632/00/webrev/
    > JBS : https://bugs.openjdk.java.net/browse/JDK-8164632
    >
    > The change cast uint ni to integer so that the parameter that pass to method TypeOopPtr::cast_to_instance_id is a integer.
    >
    > I have tested this builds successfully .
    >
    > Ensured that there are no regressions in hotspot : tier1 tests.
    >
    > Regards,
    > Eric Chen
    >



More information about the hotspot-compiler-dev mailing list