emacs-devel
[Top][All Lists]
Advanced

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

Re: USE_LSB_TAG not supported on this platform


From: Eli Zaretskii
Subject: Re: USE_LSB_TAG not supported on this platform
Date: Tue, 09 Feb 2016 20:02:47 +0200

> Cc: address@hidden, address@hidden, address@hidden
> From: Paul Eggert <address@hidden>
> Date: Tue, 9 Feb 2016 09:37:15 -0800
> 
> On 02/09/2016 08:59 AM, Eli Zaretskii wrote:
> > Thanks.  Out of curiosity: which hosts can behave like that?
> 
> 16-bit PDP-11s running 7th Edition Unix. malloc returned only a multiple 
> of 2 there. :-)

There's only one 16-bit platform supported by Emacs: MS-DOS.  And
there the problem doesn't exist, because the library switches the CPU
to 32-bit mode.

> > Also, why are we sure that the loops will end at some point on those
> > hosts?  Shouldn't we perhaps set a limit to the loop iterations, to be
> > sure we don't infloop there?
> 
> We're not absolutely sure. Certainly the C standard doesn't guarantee 
> it; malloc can return a pointer that is always odd, on weird platforms 
> where alignof always returns 1. I view this as almost purely theoretical 
> though, due to the practical performance benefit of alignment to at 
> least sizeof(double). It's conceivable (though very unlikely) that Emacs 
> will infloop on some truly oddball platform that does not care about 
> performance; but if that happens it'll be OK, as the infloop would 
> almost surely happen during a build and the builder would then send us a 
> bug report and we can deal with it then. I think adding a counter would 
> complicate the code (and possibly introduce bugs, in code that's never 
> really exercised) for not enough benefit.

Maybe these considerations are worth having as comments near the loop,
so that whoever bumps into the problem will know faster and better
what to do.

Thanks.



reply via email to

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