Opened 5 years ago

#422 new defect

matreshka-internals-calendars-clocks__posix.adb:123 range check failed

Reported by: Maxim Reznik Owned by:
Priority: major Milestone:
Component: Matreshka - League Version: 0.7.0
Keywords: Cc:

Description

On Mac OS sizeof (tv_usec) = 4 bytes, but matreshka expects 8.

sys/_types/_timeval.h:

#define _STRUCT_TIMEVAL         struct timeval
_STRUCT_TIMEVAL
{
        __darwin_time_t         tv_sec;         /* seconds */
        __darwin_suseconds_t    tv_usec;        /* and microseconds */
};

sys/_types.h:
typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */

This causes constraint_error when converting uninitialized data.

(gdb) print Current_Time
$1 = (tv_sec => 1435067664, tv_usec => 4295765796)

Change History (0)

Note: See TracTickets for help on using tickets.