This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

as.exe: out of memory allocating 4294967280 bytes

Hi all,

I'm using host == build == mingw64, target x86_64-unknown-linux-gnu.
e:/cygwin/opt/crosstool64/x86_64-unknown-linux-gnu/gcc-4.7.2-glibc-2.16.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../x86_64-unknown-linux-gnu/bin/as.exe --gdwarf2 --64 -v -o msgstub.obj msgstub.s
GNU assembler version 2.23 (x86_64-unknown-linux-gnu) using BFD version (GNU Binutils) 2.23

e:\cygwin\opt\crosstool64\x86_64-unknown-linux-gnu\gcc-4.7.2-glibc-2.16.0\x86_64-unknown-linux-gnu\bin\as.exe: out of memory allocating 4294967280 bytes

IMO the problem is in gas\sb.c
static void
sb_check (sb *ptr, size_t len)
#if GCC_VERSION >= 3004
      max = (size_t) 1 << (CHAR_BIT * sizeof (want) - __builtin_clzl (want));
"want"  size_t type which is 64-bit. Replace __builtin_clzl with __builtin_clzll fixes the problem.

CVS head has the same code. I'm not sure either it my cross tools mis-configuration or real bug in as.
If the second, it is strange - the code was committed 4 months ago...

Thank you
Vladimir Simonov

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]