Skip to content

INVARIANT_RESULT #640

Description

@kuznetsovvvv

thistimei = range32.base;
thistimecnt = range32.count;
toomanytimes = thistimecnt >> 31 >> 1 != 0;
thisleapi = range32.leapbase;
thisleapcnt = range32.leapcount;
locut = PG_INT32_MIN < lo_time;
hicut = hi_time < PG_INT32_MAX;
}
else
{
thisdefaulttype = range64.defaulttype;
thistimei = range64.base;
thistimecnt = range64.count;
toomanytimes = thistimecnt >> 31 >> 31 >> 2 != 0;
thisleapi = range64.leapbase;
thisleapcnt = range64.leapcount;
locut = min_time < lo_time;
hicut = hi_time < max_time;
}

I found potential incorrectness in the line 2291. According to the logic of further operations, thistimecnt is written to a 32-bit memory area, which means that this check does not consider values from 2^32 to (2^64) - 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions