help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] testing glpk 4.62 on a 64-bit platform


From: Andrew Makhorin
Subject: Re: [Help-glpk] testing glpk 4.62 on a 64-bit platform
Date: Wed, 24 May 2017 21:57:25 +0300

Hi Heinrich,

Thank you for your comments.

> the code is still wrong in minisat.h:
> 
> typedef int  lit;
> 
> This assumes that int never has more bits then size_t. This is not
> guaranteed. The x32 ABI uses 32bit addresses and supports 64bit integers
> (https://lwn.net/Articles/456731/). It depends on the compiler if int
> has 32 or 64bit.
>[...]
> Please, carefully review the types used in the whole module.
> It should make no assumptions about the relative lengths of pointers and
> integers.
> 

This wouldn't resolve the issue, because the glpk code supports only
ILP32 and LP64 programming models, where int is assumed to be 32-bit;
this is checked in the routine glp_init_env (see glpk/src/env/env.c).

Best regards,

Andrew Makhorin

PS: I'm not sure about x32 ABI, but I see no sense to introduce 64-bit
int, because long (or long long) provides this data type.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]