Re: [PATCH] fix crashing on amd64




On Jan 16, 2006, at 6:03 PM, Torsten Schoenfeld wrote:

On Wed, 2006-01-11 at 16:29 +0100, Thierry Vignaud wrote:

On x86_64, the conversions from ptr to int and from int to ptr will
loose the highest bits of the pointer, leading to memory access
violations. Use the safer macros that perl provides instead.

Applied to HEAD, is present in Glib 1.114.  I had to add some casts to
avoid compiler warnings, though:

Those casts might be better of directly in the macros' uses of INT2PTR. If REVIVE_UNDEAD and MAKE_UNDEAD returned SV*, you'd need only the HV* cast.

Although i'm curious as to why they needed casts --- void* is supposed to be compatible with any pointer type.



--
However, like all drugs, PANEXA can produce some notable side effects, all of which are probably really, really terrific and nothing that anyone should be concerned about, let alone notify any medical regulatory commission about.
  -- http://www.panexa.com





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