develooper Front page | perl.perl5.porters | Postings from February 2003

Re: Smoke 18501 linux 2.4.18-bf2.4 /home/abigail/Src/perl-current

Thread Previous | Thread Next
February 10, 2003 18:34
Re: Smoke 18501 linux 2.4.18-bf2.4 /home/abigail/Src/perl-current
Message ID:
Nicholas Clark <> wrote:
:On Thu, Jan 23, 2003 at 02:02:18PM +0100, Slaven Rezic wrote:
:> Nicholas Clark <> writes:
:> > Odd. Id've' expected it to fail for Andreas as well, as I thought it was a
:> > glibc 2.2.5 bug that we've not yet worked around. I know it's open as
:> > 
:> >
:> > 
:> > and possibly as other bugs. I think what never happened was noone has yet
:> > written a Configure test to conditionally enable Radu Greab's proposed
:> > work around. (see bug report)
:> > 
:> Here's a patch for the implementation of (3) (your suggestion from
:> Wed, 29 May 2002 09:38:58):
:But I don't like option 3 as much as options 1 & 2
:[1: Detect this at Configure time? 2: Work round it?]

As pointed out by Slaven, the problem is that at the time we build perl
we can determine only that the workaround may be needed, not that it
will be.

Perhaps the right solution is, when prompted by the hint file, to compile
_two_ pp_i_modulo functions, one with and one without the workaround, and
use a runtime probe to decide which one to use:

  /* use slower safer i_modulo only if this libc is buggy */
  if ((IV)3 % (IV)-10 == (IV)-3)
    PL_ppaddr[OP_I_MODULO] = &Perl_pp_safe_i_modulo;

Is that a workable solution? It seems like a quick enough check to do
once per perl interpreter. I'm not entirely sure where the check should
happen, but clearly it needs to be quite early.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About