Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] release status
From: Samuel Thibault (samuel.thibault_at_[hidden])
Date: 2009-10-02 16:32:33


Jeff Squyres, le Fri 02 Oct 2009 16:22:45 -0400, a écrit :
> *If* there is a problem, I'm sure that casting through a neutral
> type would resolve the problem (e.g., if the public handle type was
> "unsigned long").

Errr. I'm rather sure that it would just _hide_ the problem, if there
was any.

The linker remembers sizes to make sure there are no possible
incoherency issues. The problem you had in OpenMPI is that it doesn't
know that the underlying structure is actually hidden from the
application programmer, and that not checking the size is actually safe.
In the case of malloc, the void* pointer is already a neutral type
concerning the size. Only _function_ pointers are not so neutral on
some archs like ia64.

Samuel