I included Yakub on the mailing list because gcc-4.9.0 seems incurable broken.
Look, your compiler does absolutely inconceivable things with the repression (spilling) of data, including the extrusion of a constant . Lord, this compiler cannot be yet out of kindergarten. We are talking about a moron who was dropped by a head in childhood - this is the level of developmental delays:
... movq $load_balance_mask, -136(%rbp) #, %sfp subq $184, %rsp #, movq (%rdx), %rax # sd_22(D)->parent, sd_parent movl %edi, -144(%rbp) # this_cpu, %sfp movl %ecx, -140(%rbp) # idle, %sfp movq %r8, -200(%rbp) # continue_balancing, %sfp movq %rax, -184(%rbp) # sd_parent, %sfp movq -136(%rbp), %rax # %sfp, tcp_ptr__ #APP add %gs:this_cpu_off, %rax # this_cpu_off, tcp_ptr__ #NO_APP ...
Notice the contents of-136(%rbp)
. Realistically. This is an immediate constant that the compiler has supplanted.
Someone should fix this as a gcc bug. Because it is fucking fucking crazy crap.
But this part with the repression of the constant can be considered "too stupid to live." This bug is here:
movq $load_balance_mask, -136(%rbp) #, %sfp subq $184, %rsp #,
Here gcc creates a stack frame after using it to save the constant much further than the stack frame.
Source: https://habr.com/ru/post/231243/
All Articles