Hi list,[iem_sqrt4~] crashes when trying to create on amd_64.  It creates fine 
on 32 bit linux.
This leads me to believe there is something in the setup routine that makes an 
assumption that only holds true for a 32bit OS.
The only thing that stands out to me is a function called in the setup routine, 
posted below.  This looks particularly suspicious to my untrained eye:      
*(long *)(&f) = l;Even if that's not causing the crash, what does it do?

And does that or anything stand out to anyone else?
Thanks,Jonathan

static void iem_sqrt4_tilde_maketable(void)
{
  int i;
  t_float f;
  long l;
  
  if(!iem_sqrt4_tilde_exptab)
  {
    iem_sqrt4_tilde_exptab = (t_float *)getbytes(sizeof(t_float) * 
IEMSQRT4TAB1SIZE);
    for(i=0; i<IEMSQRT4TAB1SIZE; i++)
    {
      l = (i ? (i == IEMSQRT4TAB1SIZE-1 ? IEMSQRT4TAB1SIZE-2 : i) : 1)<< 23;
      *(long *)(&f) = l;
      iem_sqrt4_tilde_exptab[i] = 1.0f/sqrt(f);
    }
  }
  if(!iem_sqrt4_tilde_mantissatab)
  {
    iem_sqrt4_tilde_mantissatab = (t_float *)getbytes(sizeof(t_float) * 
IEMSQRT4TAB2SIZE);
    for(i=0; i<IEMSQRT4TAB2SIZE; i++)
    {
      f = 1.0f + (1.0f/(t_float)IEMSQRT4TAB2SIZE) * (t_float)i;
      iem_sqrt4_tilde_mantissatab[i] = 1.0f/sqrt(f);
    }
  }
}

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to