This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/20647] GLIBC quitting every program - glibc on Pentium-S leads to assertion: "maxidx >= 2"


https://sourceware.org/bugzilla/show_bug.cgi?id=20647

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to ralph from comment #5)
> Looking at the snippet
> ...
>       if (!inclusive_cache)
>         {
>           if (threads_l2 > 0)
>             core /= threads_l2;
>           shared += core;
>         }
> ...
> with both "core" and "shared" being initialized with the return value of
> "handle_intel":
> 
> in case of return value of 0:
> core = 0/xxx  = 0
> shared = 0+0  = 0
> 
> in case of return value -1
> core = -1/xxx = yyy
> shared = -1 + -1 = -2
> 
> because of the later use of these variables their value is indifferent
> as long it is below or equal to zero. 
> So "0" as return value of "handle_intel" seems ok to me.

There are

 if (data > 0)
    {
      __x86_raw_data_cache_size_half = data / 2;
      __x86_raw_data_cache_size = data;
      /* Round data cache size to multiple of 256 bytes.  */
      data = data & ~255L;
      __x86_data_cache_size_half = data / 2;
      __x86_data_cache_size = data;
    }

  if (shared > 0)
    {
      __x86_raw_shared_cache_size_half = shared / 2;
      __x86_raw_shared_cache_size = shared;
      /* Round shared cache size to multiple of 256 bytes.  */
      shared = shared & ~255L;
      __x86_shared_cache_size_half = shared / 2;
      __x86_shared_cache_size = shared;
    }

Negative values are ignored.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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