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

Description

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)

Changed 5 years ago by Timothy_Gu

Patch fixing the issue

comment:1 Changed 5 years ago by Timothy_Gu

Has a Patch: set

comment:2 Changed 5 years ago by Timothy_Gu

Summary: Definition of INT64_MIN wrongSign of INT64_MIN is wrong

comment:3 Changed 5 years ago by pulkomandy

Owner: changed from nobody to korli
Status: newassigned

comment:4 Changed 5 years ago by korli

Resolution: fixed
Status: assignedclosed

Applied in hrev48532. Thanks!

comment:5 Changed 5 years ago by korli

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