problem with __init_cpu_features()

The Source thesourcehim@gmail.com
Thu May 19 17:00:00 GMT 2016


19.05.2016 19:44, Carlos O'Donell пишет:
> On Thu, May 19, 2016 at 10:40 AM, The Source <thesourcehim@gmail.com> wrote:
>> 1. I changed libc code slightly to avoid using cpuid inside pthread:
>>
>> sysdeps/unix/sysv/linux/x86/elision-conf.c
>>
>> Replaced all usage of HAS_RTM to 0:
>>
>>   __elision_available = 0;//HAS_RTM;
>> #ifdef ENABLE_LOCK_ELISION
>>    __pthread_force_elision = __libc_enable_secure ? 0 : __elision_available;
>> #endif
>>    //if (!HAS_RTM)
>>      __elision_aconf.retry_try_xbegin = 0; /* Disable elision on rwlocks */
> There should be no use of cpuid inside libpthread.
>
> What is failing here?
>
>> 2. And crash has gone from libpthread. But poped up in different place:
>>
>> libgcc_s: libgcc/config/i386/cpuinfo.c
>>
>> __cpu_indicator_init function uses cpuid
> That would be a gcc bug. File a bug in their tracker.
>
>> So cpuid pops up here and there even if everything is built for i486. Isn't
>> there a way to completely get rid of it?
> Nobody builds for i486 anymore, so what you're seeing is just bitrot
> from an untested configuration.
>
> Please file bugs and we'll fix everything you can find.
>
> Cheers,
> Carlos.

HAS_TRM is a macro that calls __get_cpu_features which calls 
__init_cpu_features which uses cpuid

Ok, thanks for your help, I know that's pretty old cpu, but it's not my 
call here. I think I can get rid of libgcc_s dependency by building 
static executable.




More information about the Libc-help mailing list