Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#11647 closed bug (fixed)

Sign of INT64_MIN is wrong

Reported by: Timothy_Gu Owned by: korli
Priority: normal Milestone: R1
Component: System/POSIX Version: R1/Development
Keywords: stdint gci2014 Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All


Hi, the follow program exits with code 1 on x86_64 at least, although from the look of code x86 could be affected as well.

#include <stdint.h>

int main() {
    int64_t test = 5;
    if (test < INT64_MIN)
        return 1;
    return 0;

A patch that fixes this issue is attached.

This is a regression since 1d13a60901 (hrev48499).

Attachments (1)

0001-stdint.h-use-correct-type-for-INT64_MAX.patch (1.4 KB ) - added by Timothy_Gu 5 years ago.
Patch fixing the issue

Download all attachments as: .zip

Change History (6)

by Timothy_Gu, 5 years ago

Patch fixing the issue

comment:1 by Timothy_Gu, 5 years ago

Has a Patch: set

comment:2 by Timothy_Gu, 5 years ago

Summary: Definition of INT64_MIN wrongSign of INT64_MIN is wrong

comment:3 by pulkomandy, 5 years ago

Owner: changed from nobody to korli
Status: newassigned

comment:4 by korli, 5 years ago

Resolution: fixed
Status: assignedclosed

Applied in hrev48532. Thanks!

comment:5 by korli, 5 years ago

Keywords: gci2014 added
Note: See TracTickets for help on using tickets.