wordcopy.c segfault on external function call

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

 



Hi There,

The following code extest.cpp:

extern "C" { int ilaenv_( int *ispec, const char *name, const char
*uplo, int *N, int *N2, int *N3, int *N4 ); }

int main ()
{
  int ispec = 1;
  const char* name = 'DSYTRD';
  const char uplo = 'U';
  int N = 4;
  int N2 = -1;
  int N3 = -1;
  int N4 = -1;
  int NB;

  NB = ilaenv_( &ispec, name, &uplo, &N, &N2, &N3, &N4 );

  return 0;

}

compiled with:

g++ -ggdb -L/.../lapack/ extest.cpp -llapack -lblas -lgfortran

using g++ 4.4.1, when run under gdb, segfaults at the external
function call, giving:

Program received signal SIGSEGV, Segmentation fault.
_wordcopy_bwd_aligned (dstp=140737353957304, srcp=-130065848,
len=2305843009196895680) at wordcopy.c:282

the backtrace yields:

#0  _wordcopy_bwd_aligned (dstp=140737353957304, srcp=-130065848,
len=2305843009196895680) at wordcopy.c:282
#1  0x00007ffff709ccaa in memmove (dest=0x7fffffffd1f0, src=<value
optimized out>, len=18446744073575165448) at memmove.c:99
#2  0x000000000040f7c1 in ilaenv_ ()
#3  0x00007fffffffda90 in ?? ()
#4  0x00007fffffffdbf0 in ?? ()
#5  0x0000000000000002 in ?? ()
#6  0x00007fffffffdbf0 in ?? ()
#7  0x00007fffffffd25f in ?? ()
#8  0x00007fffffffda60 in ?? ()
#9  0x0000000000000000 in ?? ()

I have only a faint idea of what wordcopy.c does, but I'm guessing
that the length parameter here is perhaps a bit large.  I thought I'd
post here in case there's a known issue with wordcopy.c.


Thanks,
-David


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux