Re: testing glpk 4.62 on a 64-bit platform

Andrew Makhorin <[email protected]>
Newsgroups gmane.comp.gnu.glpk
Message-ID <1495652245.15060.17.camel@corvax>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.