Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello World segfault with Phobos as shared library #194

Closed
kefahi opened this issue Oct 12, 2012 · 14 comments
Closed

Hello World segfault with Phobos as shared library #194

kefahi opened this issue Oct 12, 2012 · 14 comments

Comments

@kefahi
Copy link

kefahi commented Oct 12, 2012

Hello,

I'm using the latest Fedora 18 (spherical cow) 64 bits on my Ivy Bridge i7-3520M Lenovo T430.
Running the simplest hello-world program segfaults.

It looks to me like an alignment issue due to the cpu arch.
Note : This very code runs without issues on a Virtual Machine (Fedora 18 with latest updates).

Here are more details :

Fedora 18 64bits latest updates.

[root@localhost ~]# uname -a
Linux localhost.localdomain 3.6.1-1.fc18.x86_64 #1 SMP Mon Oct 8
17:19:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]#  rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}\n' ldc
ldc-2-33.20121007git0777102.fc18

[kefah@localhost Development]$ cat hello.d 
import std.stdio;
void main() { writeln("Hello, World!"); }
[kefah@localhost Development]$ rm hello hello.o
[kefah@localhost Development]$ ldc2 -g hello.d
[kefah@localhost Development]$ gdb ./hello 
GNU gdb (GDB) Fedora (7.5.0.20120926-25.fc18)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/kefah/Development/hello...done.
(gdb) run
Starting program: /home/kefah/Development/hello 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
core.cpuid.cpuidX86() () at cpuid.d:610
610         xfeatures = cast(ulong)d << 32 | a;

(Edit by @klickverbot: I moved the strace output here, as it doesn't seem to be interesting, yet is huge.)

@dnadlinger
Copy link
Member

[Added code tags to the original post and adjusted the description]

Uh oh, this looks like a tricky low-level issue indeed. As it does not occur on any of the boxes I have access to, could you please do two things:

First, find out which instruction really causes the segfault, using disassemble in GDB.

Second, just to narrow down the problem a bit, could you try to compile LDC manually from Git master, without building the druntime/Phobos as dynamic libraries? It should be quite easy, just follow the README (I don't remember right now if Fedora does separate "dev" packages – if so, then you probably need to install them for LLVM and libconfig).

@bioinfornatics
Copy link
Contributor

just to said from my virtual machine with f18 it works fine

fedora provides :

  • phobos/druntime as shared lib
  • a separate devel package

@kefahi
Copy link
Author

kefahi commented Oct 12, 2012

I went to the second comment directly and compiled LDC right from source (git master) using standard fedora development packages as per your instructions, and that worked without any problems. which means that this might be either specific to fedora patches or the problem is actually fixed on more recent code.

Next I will try to repackage ldc and related packages using the latest code from git and will update you on how it goes.

Thank you very much for your insightful comment.

@bioinfornatics
Copy link
Contributor

did you have build ldc as shared lib or static ? that is strange that. I do not get this problem

@kefahi
Copy link
Author

kefahi commented Oct 12, 2012

I actually just went with the standard build procedure; which I guess is static. Lemme try dynamic / shared.

@kefahi
Copy link
Author

kefahi commented Oct 12, 2012

Interesting outcome ... compiled as shared libs segfaults.

Prior to cmake I defined this :
export BUILD_SHARED_LIBS=ON
then make clean , then make

then prior to compiling and running:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/kefah/Downloads/ldc/build/lib

And just to be sure about things ... I uninstalled (yum removed) all ldc related packages from my system)

Here is the disassembler dump, although I am not sure at which line did it exactly segfault ...

[kefah@localhost Development]$ gdb ./hello
GNU gdb (GDB) Fedora (7.5.0.20120926-25.fc18)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /home/kefah/Development/hello...done.
(gdb) disassemble
No frame selected.
(gdb) run
Starting program: /home/kefah/Development/hello
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
core.cpuid.cpuidX86() () at cpuid.d:610
610 xfeatures = cast(ulong)d << 32 | a;
(gdb) disassemble
Dump of assembler code for function _D4core5cpuid8cpuidX86FZv:
0x00007ffff7cbaf40 <+0>: push %rbp
0x00007ffff7cbaf41 <+1>: mov %rsp,%rbp
0x00007ffff7cbaf44 <+4>: push %rbx
0x00007ffff7cbaf45 <+5>: sub $0xb8,%rsp
0x00007ffff7cbaf4c <+12>: mov 0x305dc5(%rip),%rax # 0x7ffff7fc0d18
0x00007ffff7cbaf53 <+19>: mov 0x30434e(%rip),%rcx # 0x7ffff7fbf2a8
0x00007ffff7cbaf5a <+26>: mov 0x305fff(%rip),%rdx # 0x7ffff7fc0f60
0x00007ffff7cbaf61 <+33>: mov %rdx,-0x10(%rbp)
0x00007ffff7cbaf65 <+37>: movl $0x0,-0x14(%rbp)
0x00007ffff7cbaf6c <+44>: movl $0x0,-0x18(%rbp)
0x00007ffff7cbaf73 <+51>: movl $0x0,-0x1c(%rbp)
0x00007ffff7cbaf7a <+58>: movl $0x0,-0x20(%rbp)
0x00007ffff7cbaf81 <+65>: movl $0x0,-0x24(%rbp)
0x00007ffff7cbaf88 <+72>: mov %rax,-0x58(%rbp)
0x00007ffff7cbaf8c <+76>: mov %rcx,-0x60(%rbp)
0x00007ffff7cbaf90 <+80>: mov $0x0,%eax
0x00007ffff7cbaf95 <+85>: cpuid
0x00007ffff7cbaf97 <+87>: mov %eax,-0x14(%rbp)
0x00007ffff7cbaf9a <+90>: mov -0x10(%rbp),%rax
0x00007ffff7cbaf9e <+94>: mov %ebx,(%rax)
0x00007ffff7cbafa0 <+96>: mov %edx,0x4(%rax)
0x00007ffff7cbafa3 <+99>: mov %ecx,0x8(%rax)
0x00007ffff7cbafa6 <+102>: mov $0x80000000,%eax
0x00007ffff7cbafab <+107>: cpuid
0x00007ffff7cbafad <+109>: mov %eax,-0x24(%rbp)
0x00007ffff7cbafb0 <+112>: mov -0x14(%rbp),%eax
0x00007ffff7cbafb3 <+115>: mov -0x60(%rbp),%rsi
0x00007ffff7cbafb7 <+119>: mov %eax,(%rsi)
0x00007ffff7cbafb9 <+121>: mov -0x24(%rbp),%eax
0x00007ffff7cbafbc <+124>: mov -0x58(%rbp),%rdi
0x00007ffff7cbafc0 <+128>: mov %eax,(%rdi)
0x00007ffff7cbafc2 <+130>: mov $0xc,%r8d
0x00007ffff7cbafc8 <+136>: mov 0x305f91(%rip),%rsi # 0x7ffff7fc0f60
0x00007ffff7cbafcf <+143>: lea 0x85b5f(%rip),%rcx # 0x7ffff7d40b35 <.str1>
0x00007ffff7cbafd6 <+150>: mov 0x304dc3(%rip),%r9 # 0x7ffff7fbfda0
0x00007ffff7cbafdd <+157>: mov %r8,%rdi
0x00007ffff7cbafe0 <+160>: mov %r8,%rdx
0x00007ffff7cbafe3 <+163>: mov %r9,%r8
0x00007ffff7cbafe6 <+166>: callq 0x7ffff7b55ac0 _adEq2@plt
0x00007ffff7cbafeb <+171>: mov 0x304006(%rip),%rcx # 0x7ffff7fbeff8
0x00007ffff7cbaff2 <+178>: cmp $0x0,%eax
0x00007ffff7cbaff7 <+183>: setne %r10b
---Type to continue, or q to quit---
0x00007ffff7cbaffb <+187>: and $0x1,%r10b
0x00007ffff7cbafff <+191>: mov %r10b,(%rcx)
0x00007ffff7cbb002 <+194>: mov $0xc,%ecx
0x00007ffff7cbb007 <+199>: mov 0x305f52(%rip),%rsi # 0x7ffff7fc0f60
0x00007ffff7cbb00e <+206>: lea 0x85b2d(%rip),%rdx # 0x7ffff7d40b42 <.str2>
0x00007ffff7cbb015 <+213>: mov 0x304d84(%rip),%r8 # 0x7ffff7fbfda0
0x00007ffff7cbb01c <+220>: mov %rcx,%rdi
0x00007ffff7cbb01f <+223>: mov %rdx,-0x68(%rbp)
0x00007ffff7cbb023 <+227>: mov %rcx,%rdx
0x00007ffff7cbb026 <+230>: mov -0x68(%rbp),%rcx
0x00007ffff7cbb02a <+234>: callq 0x7ffff7b55ac0 _adEq2@plt
0x00007ffff7cbb02f <+239>: mov 0x305762(%rip),%rcx # 0x7ffff7fc0798
0x00007ffff7cbb036 <+246>: mov 0x30588b(%rip),%rdx # 0x7ffff7fc08c8
0x00007ffff7cbb03d <+253>: mov 0x3047e4(%rip),%rsi # 0x7ffff7fbf828
0x00007ffff7cbb044 <+260>: cmp $0x0,%eax
0x00007ffff7cbb049 <+265>: setne %r10b
0x00007ffff7cbb04d <+269>: and $0x1,%r10b
0x00007ffff7cbb051 <+273>: mov %r10b,(%rsi)
0x00007ffff7cbb054 <+276>: movl $0x0,-0x28(%rbp)
0x00007ffff7cbb05b <+283>: mov %rcx,-0x70(%rbp)
0x00007ffff7cbb05f <+287>: mov %rdx,-0x78(%rbp)
0x00007ffff7cbb063 <+291>: mov $0x1,%eax
0x00007ffff7cbb068 <+296>: cpuid
0x00007ffff7cbb06a <+298>: mov %eax,-0x14(%rbp)
0x00007ffff7cbb06d <+301>: mov %ebx,-0x28(%rbp)
0x00007ffff7cbb070 <+304>: mov %ecx,-0x1c(%rbp)
0x00007ffff7cbb073 <+307>: mov %edx,-0x20(%rbp)
0x00007ffff7cbb076 <+310>: mov -0x20(%rbp),%eax
0x00007ffff7cbb079 <+313>: mov -0x78(%rbp),%rsi
0x00007ffff7cbb07d <+317>: mov %eax,(%rsi)
0x00007ffff7cbb07f <+319>: mov -0x1c(%rbp),%eax
0x00007ffff7cbb082 <+322>: mov -0x70(%rbp),%rdi
0x00007ffff7cbb086 <+326>: mov %eax,(%rdi)
0x00007ffff7cbb088 <+328>: mov (%rdi),%eax
0x00007ffff7cbb08a <+330>: and $0x8000000,%eax
0x00007ffff7cbb08f <+335>: cmp $0x0,%eax
0x00007ffff7cbb094 <+340>: je 0x7ffff7cbb0bb <_D4core5cpuid8cpuidX86FZv+379>
0x00007ffff7cbb096 <+342>: mov 0x303ff3(%rip),%rax # 0x7ffff7fbf090
0x00007ffff7cbb09d <+349>: mov $0x0,%ecx
0x00007ffff7cbb0a2 <+354>: xgetbv
0x00007ffff7cbb0a5 <+357>: mov %edx,-0x20(%rbp)
0x00007ffff7cbb0a8 <+360>: mov %eax,-0x14(%rbp)
0x00007ffff7cbb0ab <+363>: mov -0x20(%rbp),%edx
---Type to continue, or q to quit---
0x00007ffff7cbb0ae <+366>: shl $0x20,%rdx
0x00007ffff7cbb0b2 <+370>: mov -0x14(%rbp),%esi
0x00007ffff7cbb0b5 <+373>: or %rsi,%rdx
=> 0x00007ffff7cbb0b8 <+376>: mov %rdx,(%rax)
0x00007ffff7cbb0bb <+379>: mov 0x305c56(%rip),%rax # 0x7ffff7fc0d18
0x00007ffff7cbb0c2 <+386>: mov 0x305da7(%rip),%rcx # 0x7ffff7fc0e70
0x00007ffff7cbb0c9 <+393>: mov 0x304478(%rip),%rdx # 0x7ffff7fbf548
0x00007ffff7cbb0d0 <+400>: movl $0x0,(%rdx)
0x00007ffff7cbb0d6 <+406>: movl $0x0,(%rcx)
0x00007ffff7cbb0dc <+412>: cmpl $0x80000001,(%rax)
0x00007ffff7cbb0e2 <+418>: jb 0x7ffff7cbb11f <_D4core5cpuid8cpuidX86FZv+479>
0x00007ffff7cbb0e4 <+420>: mov 0x30445d(%rip),%rax # 0x7ffff7fbf548
0x00007ffff7cbb0eb <+427>: mov 0x305d7e(%rip),%rcx # 0x7ffff7fc0e70
0x00007ffff7cbb0f2 <+434>: mov %rax,-0x80(%rbp)
0x00007ffff7cbb0f6 <+438>: mov %rcx,-0x88(%rbp)
0x00007ffff7cbb0fd <+445>: mov $0x80000001,%eax
0x00007ffff7cbb102 <+450>: cpuid
0x00007ffff7cbb104 <+452>: mov %ecx,-0x1c(%rbp)
0x00007ffff7cbb107 <+455>: mov %edx,-0x20(%rbp)
0x00007ffff7cbb10a <+458>: mov -0x1c(%rbp),%eax
0x00007ffff7cbb10d <+461>: mov -0x88(%rbp),%rsi
0x00007ffff7cbb114 <+468>: mov %eax,(%rsi)
0x00007ffff7cbb116 <+470>: mov -0x20(%rbp),%eax
0x00007ffff7cbb119 <+473>: mov -0x80(%rbp),%rdi
0x00007ffff7cbb11d <+477>: mov %eax,(%rdi)
0x00007ffff7cbb11f <+479>: callq 0x7ffff7b4e750 _D4core5cpuid8amd3dnowFNdZb@plt
0x00007ffff7cbb124 <+484>: test $0x1,%al
0x00007ffff7cbb126 <+486>: jne 0x7ffff7cbb12a <_D4core5cpuid8cpuidX86FZv+490>
0x00007ffff7cbb128 <+488>: jmp 0x7ffff7cbb134 <_D4core5cpuid8cpuidX86FZv+500>
0x00007ffff7cbb12a <+490>: mov 0x303ec7(%rip),%rax # 0x7ffff7fbeff8
0x00007ffff7cbb131 <+497>: movb $0x0,(%rax)
0x00007ffff7cbb134 <+500>: mov $0x1,%al
0x00007ffff7cbb136 <+502>: mov 0x303f0b(%rip),%rcx # 0x7ffff7fbf048
0x00007ffff7cbb13d <+509>: mov -0x14(%rbp),%edx
0x00007ffff7cbb140 <+512>: and $0xf,%edx
0x00007ffff7cbb146 <+518>: mov %edx,(%rcx)
0x00007ffff7cbb148 <+520>: mov -0x14(%rbp),%edx
0x00007ffff7cbb14b <+523>: shr $0x8,%edx
0x00007ffff7cbb14e <+526>: and $0xf,%edx
0x00007ffff7cbb154 <+532>: mov %edx,-0x2c(%rbp)
0x00007ffff7cbb157 <+535>: mov -0x14(%rbp),%edx
0x00007ffff7cbb15a <+538>: shr $0x4,%edx
0x00007ffff7cbb15d <+541>: and $0xf,%edx
---Type to continue, or q to quit---
0x00007ffff7cbb163 <+547>: mov %edx,-0x30(%rbp)
0x00007ffff7cbb166 <+550>: cmpl $0xf,-0x2c(%rbp)
0x00007ffff7cbb16d <+557>: mov %al,-0x89(%rbp)
0x00007ffff7cbb173 <+563>: je 0x7ffff7cbb1c6 <_D4core5cpuid8cpuidX86FZv+646>
0x00007ffff7cbb175 <+565>: jmp 0x7ffff7cbb1b6 <_D4core5cpuid8cpuidX86FZv+630>
0x00007ffff7cbb177 <+567>: mov -0x14(%rbp),%eax
0x00007ffff7cbb17a <+570>: shr $0x14,%eax
0x00007ffff7cbb17d <+573>: mov -0x2c(%rbp),%ecx
0x00007ffff7cbb180 <+576>: add %eax,%ecx
0x00007ffff7cbb182 <+578>: and $0xff,%ecx
0x00007ffff7cbb188 <+584>: mov %ecx,-0x34(%rbp)
0x00007ffff7cbb18b <+587>: jmp 0x7ffff7cbb193 <_D4core5cpuid8cpuidX86FZv+595>
0x00007ffff7cbb18d <+589>: mov -0x2c(%rbp),%eax
0x00007ffff7cbb190 <+592>: mov %eax,-0x34(%rbp)
0x00007ffff7cbb193 <+595>: mov $0x1,%al
0x00007ffff7cbb195 <+597>: mov 0x304ef4(%rip),%rcx # 0x7ffff7fc0090
0x00007ffff7cbb19c <+604>: mov -0x34(%rbp),%edx
0x00007ffff7cbb19f <+607>: mov %edx,(%rcx)
0x00007ffff7cbb1a1 <+609>: cmpl $0xf,-0x2c(%rbp)
0x00007ffff7cbb1a8 <+616>: mov %al,-0x8a(%rbp)
0x00007ffff7cbb1ae <+622>: je 0x7ffff7cbb248 <_D4core5cpuid8cpuidX86FZv+776>
0x00007ffff7cbb1b4 <+628>: jmp 0x7ffff7cbb21c <_D4core5cpuid8cpuidX86FZv+732>
0x00007ffff7cbb1b6 <+630>: cmpl $0x0,-0x2c(%rbp)
0x00007ffff7cbb1bd <+637>: sete %al
0x00007ffff7cbb1c0 <+640>: mov %al,-0x89(%rbp)
0x00007ffff7cbb1c6 <+646>: mov -0x89(%rbp),%al
0x00007ffff7cbb1cc <+652>: test $0x1,%al
0x00007ffff7cbb1ce <+654>: jne 0x7ffff7cbb177 <_D4core5cpuid8cpuidX86FZv+567>
0x00007ffff7cbb1d0 <+656>: jmp 0x7ffff7cbb18d <_D4core5cpuid8cpuidX86FZv+589>
0x00007ffff7cbb1d2 <+658>: mov -0x14(%rbp),%eax
0x00007ffff7cbb1d5 <+661>: shr $0xc,%eax
0x00007ffff7cbb1d8 <+664>: and $0xf0,%eax
0x00007ffff7cbb1dd <+669>: mov -0x30(%rbp),%ecx
0x00007ffff7cbb1e0 <+672>: add %eax,%ecx
0x00007ffff7cbb1e2 <+674>: mov %ecx,-0x38(%rbp)
0x00007ffff7cbb1e5 <+677>: jmp 0x7ffff7cbb1ed <_D4core5cpuid8cpuidX86FZv+685>
0x00007ffff7cbb1e7 <+679>: mov -0x30(%rbp),%eax
0x00007ffff7cbb1ea <+682>: mov %eax,-0x38(%rbp)
0x00007ffff7cbb1ed <+685>: mov $0x0,%al
0x00007ffff7cbb1ef <+687>: mov -0x38(%rbp),%ecx
0x00007ffff7cbb1f2 <+690>: mov 0x304137(%rip),%rdx # 0x7ffff7fbf330
0x00007ffff7cbb1f9 <+697>: mov %ecx,(%rdx)
0x00007ffff7cbb1fb <+699>: mov 0x303df6(%rip),%rdx # 0x7ffff7fbeff8
---Type to continue, or q to quit---
0x00007ffff7cbb202 <+706>: mov (%rdx),%sil
0x00007ffff7cbb205 <+709>: xor %dil,%dil
0x00007ffff7cbb208 <+712>: test %sil,%sil
0x00007ffff7cbb20b <+715>: mov %al,-0x8b(%rbp)
0x00007ffff7cbb211 <+721>: mov %dil,-0x8c(%rbp)
0x00007ffff7cbb218 <+728>: je 0x7ffff7cbb254 <_D4core5cpuid8cpuidX86FZv+788>
0x00007ffff7cbb21a <+730>: jmp 0x7ffff7cbb26a <_D4core5cpuid8cpuidX86FZv+810>
0x00007ffff7cbb21c <+732>: mov $0x0,%al
0x00007ffff7cbb21e <+734>: cmpl $0x6,-0x2c(%rbp)
0x00007ffff7cbb225 <+741>: mov %al,-0x8d(%rbp)
0x00007ffff7cbb22b <+747>: jne 0x7ffff7cbb23c <_D4core5cpuid8cpuidX86FZv+764>
0x00007ffff7cbb22d <+749>: mov 0x303dc4(%rip),%rax # 0x7ffff7fbeff8
0x00007ffff7cbb234 <+756>: mov (%rax),%cl
0x00007ffff7cbb236 <+758>: mov %cl,-0x8d(%rbp)
0x00007ffff7cbb23c <+764>: mov -0x8d(%rbp),%al
0x00007ffff7cbb242 <+770>: mov %al,-0x8a(%rbp)
0x00007ffff7cbb248 <+776>: mov -0x8a(%rbp),%al
0x00007ffff7cbb24e <+782>: test $0x1,%al
0x00007ffff7cbb250 <+784>: jne 0x7ffff7cbb1d2 <_D4core5cpuid8cpuidX86FZv+658>
0x00007ffff7cbb252 <+786>: jmp 0x7ffff7cbb1e7 <_D4core5cpuid8cpuidX86FZv+679>
0x00007ffff7cbb254 <+788>: mov 0x305abd(%rip),%rax # 0x7ffff7fc0d18
0x00007ffff7cbb25b <+795>: cmpl $0x80000008,(%rax)
0x00007ffff7cbb261 <+801>: setae %cl
0x00007ffff7cbb264 <+804>: mov %cl,-0x8c(%rbp)
0x00007ffff7cbb26a <+810>: mov -0x8c(%rbp),%al
0x00007ffff7cbb270 <+816>: test $0x1,%al
0x00007ffff7cbb272 <+818>: jne 0x7ffff7cbb279 <_D4core5cpuid8cpuidX86FZv+825>
0x00007ffff7cbb274 <+820>: jmpq 0x7ffff7cbb2fe <_D4core5cpuid8cpuidX86FZv+958>
0x00007ffff7cbb279 <+825>: mov $0x80000008,%eax
0x00007ffff7cbb27e <+830>: cpuid
0x00007ffff7cbb280 <+832>: mov %ecx,-0x1c(%rbp)
0x00007ffff7cbb283 <+835>: mov -0x1c(%rbp),%eax
0x00007ffff7cbb286 <+838>: shr $0xc,%eax
0x00007ffff7cbb289 <+841>: and $0xf,%eax
0x00007ffff7cbb28e <+846>: mov %eax,-0x3c(%rbp)
0x00007ffff7cbb291 <+849>: cmpl $0x0,-0x3c(%rbp)
0x00007ffff7cbb298 <+856>: jne 0x7ffff7cbb2c8 <_D4core5cpuid8cpuidX86FZv+904>
0x00007ffff7cbb29a <+858>: callq 0x7ffff7b4fca0 _D4core5cpuid17hyperThreadingBitFNdZb@plt
0x00007ffff7cbb29f <+863>: test $0x1,%al
0x00007ffff7cbb2a1 <+865>: jne 0x7ffff7cbb2a5 <_D4core5cpuid8cpuidX86FZv+869>
0x00007ffff7cbb2a3 <+867>: jmp 0x7ffff7cbb2b9 <_D4core5cpuid8cpuidX86FZv+889>
0x00007ffff7cbb2a5 <+869>: mov 0x304c54(%rip),%rax # 0x7ffff7fbff00
0x00007ffff7cbb2ac <+876>: mov -0x1c(%rbp),%ecx
---Type to continue, or q to quit---
0x00007ffff7cbb2af <+879>: and $0xff,%ecx
0x00007ffff7cbb2b5 <+885>: mov %ecx,(%rax)
0x00007ffff7cbb2b7 <+887>: jmp 0x7ffff7cbb2c6 <_D4core5cpuid8cpuidX86FZv+902>
0x00007ffff7cbb2b9 <+889>: mov 0x304c40(%rip),%rax # 0x7ffff7fbff00
0x00007ffff7cbb2c0 <+896>: movl $0x1,(%rax)
0x00007ffff7cbb2c6 <+902>: jmp 0x7ffff7cbb2fc <_D4core5cpuid8cpuidX86FZv+956>
0x00007ffff7cbb2c8 <+904>: mov 0x304c31(%rip),%rax # 0x7ffff7fbff00
0x00007ffff7cbb2cf <+911>: movl $0x1,(%rax)
0x00007ffff7cbb2d5 <+917>: cmpl $0x0,-0x3c(%rbp)
0x00007ffff7cbb2dc <+924>: je 0x7ffff7cbb2fa <_D4core5cpuid8cpuidX86FZv+954>
0x00007ffff7cbb2de <+926>: mov 0x304c1b(%rip),%rax # 0x7ffff7fbff00
0x00007ffff7cbb2e5 <+933>: mov (%rax),%ecx
0x00007ffff7cbb2e7 <+935>: shl $0x1,%ecx
0x00007ffff7cbb2ea <+938>: mov %ecx,(%rax)
0x00007ffff7cbb2ec <+940>: mov -0x3c(%rbp),%ecx
0x00007ffff7cbb2ef <+943>: sub $0x1,%ecx
0x00007ffff7cbb2f5 <+949>: mov %ecx,-0x3c(%rbp)
0x00007ffff7cbb2f8 <+952>: jmp 0x7ffff7cbb2d5 <_D4core5cpuid8cpuidX86FZv+917>
0x00007ffff7cbb2fa <+954>: jmp 0x7ffff7cbb2fc <_D4core5cpuid8cpuidX86FZv+956>
0x00007ffff7cbb2fc <+956>: jmp 0x7ffff7cbb2fe <_D4core5cpuid8cpuidX86FZv+958>
0x00007ffff7cbb2fe <+958>: mov 0x305a13(%rip),%rax # 0x7ffff7fc0d18
0x00007ffff7cbb305 <+965>: cmpl $0x80000004,(%rax)
0x00007ffff7cbb30b <+971>: jb 0x7ffff7cbb4a9 <_D4core5cpuid8cpuidX86FZv+1385>
0x00007ffff7cbb311 <+977>: mov 0x3056e0(%rip),%rax # 0x7ffff7fc09f8
0x00007ffff7cbb318 <+984>: mov %rax,-0x48(%rbp)
0x00007ffff7cbb31c <+988>: push %rsi
0x00007ffff7cbb31d <+989>: mov -0x48(%rbp),%rsi
0x00007ffff7cbb321 <+993>: mov $0x80000002,%eax
0x00007ffff7cbb326 <+998>: cpuid
0x00007ffff7cbb328 <+1000>: mov %eax,(%rsi)
0x00007ffff7cbb32a <+1002>: mov %ebx,0x4(%rsi)
0x00007ffff7cbb32d <+1005>: mov %ecx,0x8(%rsi)
0x00007ffff7cbb330 <+1008>: mov %edx,0xc(%rsi)
0x00007ffff7cbb333 <+1011>: mov $0x80000003,%eax
0x00007ffff7cbb338 <+1016>: cpuid
0x00007ffff7cbb33a <+1018>: mov %eax,0x10(%rsi)
0x00007ffff7cbb33d <+1021>: mov %ebx,0x14(%rsi)
0x00007ffff7cbb340 <+1024>: mov %ecx,0x18(%rsi)
0x00007ffff7cbb343 <+1027>: mov %edx,0x1c(%rsi)
0x00007ffff7cbb346 <+1030>: mov $0x80000004,%eax
0x00007ffff7cbb34b <+1035>: cpuid
0x00007ffff7cbb34d <+1037>: mov %eax,0x20(%rsi)
0x00007ffff7cbb350 <+1040>: mov %ebx,0x24(%rsi)
---Type to continue, or q to quit---
0x00007ffff7cbb353 <+1043>: mov %ecx,0x28(%rsi)
0x00007ffff7cbb356 <+1046>: mov %edx,0x2c(%rsi)
0x00007ffff7cbb359 <+1049>: pop %rsi
0x00007ffff7cbb35a <+1050>: movl $0x0,-0x4c(%rbp)
0x00007ffff7cbb361 <+1057>: movl $0x0,-0x50(%rbp)
0x00007ffff7cbb368 <+1064>: movslq -0x4c(%rbp),%rax
0x00007ffff7cbb36c <+1068>: cmp $0x30,%rax
0x00007ffff7cbb372 <+1074>: mov %rax,-0x98(%rbp)
0x00007ffff7cbb379 <+1081>: jb 0x7ffff7cbb38f <_D4core5cpuid8cpuidX86FZv+1103>
0x00007ffff7cbb37b <+1083>: mov 0x305bc6(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb382 <+1090>: mov $0x2c6,%esi
0x00007ffff7cbb387 <+1095>: mov %rax,%rdi
0x00007ffff7cbb38a <+1098>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb38f <+1103>: mov 0x305662(%rip),%rax # 0x7ffff7fc09f8
0x00007ffff7cbb396 <+1110>: mov -0x98(%rbp),%rcx
0x00007ffff7cbb39d <+1117>: movzbl (%rax,%rcx,1),%edx
0x00007ffff7cbb3a1 <+1121>: cmp $0x20,%edx
0x00007ffff7cbb3a7 <+1127>: jne 0x7ffff7cbb3b6 <_D4core5cpuid8cpuidX86FZv+1142>
0x00007ffff7cbb3a9 <+1129>: mov -0x4c(%rbp),%eax
0x00007ffff7cbb3ac <+1132>: add $0x1,%eax
0x00007ffff7cbb3b1 <+1137>: mov %eax,-0x4c(%rbp)
0x00007ffff7cbb3b4 <+1140>: jmp 0x7ffff7cbb368 <_D4core5cpuid8cpuidX86FZv+1064>
0x00007ffff7cbb3b6 <+1142>: jmp 0x7ffff7cbb3b8 <_D4core5cpuid8cpuidX86FZv+1144>
0x00007ffff7cbb3b8 <+1144>: movslq -0x50(%rbp),%rax
0x00007ffff7cbb3bc <+1148>: movabs $0x30,%rcx
0x00007ffff7cbb3c6 <+1158>: sub %rax,%rcx
0x00007ffff7cbb3c9 <+1161>: sub $0x1,%rcx
0x00007ffff7cbb3d0 <+1168>: cmp $0x30,%rcx
0x00007ffff7cbb3d7 <+1175>: mov %rcx,-0xa0(%rbp)
0x00007ffff7cbb3de <+1182>: jb 0x7ffff7cbb3f4 <_D4core5cpuid8cpuidX86FZv+1204>
0x00007ffff7cbb3e0 <+1184>: mov 0x305b61(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb3e7 <+1191>: mov $0x2c7,%esi
0x00007ffff7cbb3ec <+1196>: mov %rax,%rdi
0x00007ffff7cbb3ef <+1199>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb3f4 <+1204>: mov 0x3055fd(%rip),%rax # 0x7ffff7fc09f8
0x00007ffff7cbb3fb <+1211>: mov -0xa0(%rbp),%rcx
0x00007ffff7cbb402 <+1218>: movzbl (%rax,%rcx,1),%edx
0x00007ffff7cbb406 <+1222>: cmp $0x0,%edx
0x00007ffff7cbb40c <+1228>: jne 0x7ffff7cbb41b <_D4core5cpuid8cpuidX86FZv+1243>
0x00007ffff7cbb40e <+1230>: mov -0x50(%rbp),%eax
0x00007ffff7cbb411 <+1233>: add $0x1,%eax
0x00007ffff7cbb416 <+1238>: mov %eax,-0x50(%rbp)
0x00007ffff7cbb419 <+1241>: jmp 0x7ffff7cbb3b8 <_D4core5cpuid8cpuidX86FZv+1144>
---Type to continue, or q to quit---
0x00007ffff7cbb41b <+1243>: mov 0x3055d6(%rip),%rax # 0x7ffff7fc09f8
0x00007ffff7cbb422 <+1250>: movslq -0x4c(%rbp),%rcx
0x00007ffff7cbb426 <+1254>: movslq -0x50(%rbp),%rdx
0x00007ffff7cbb42a <+1258>: movabs $0x30,%rsi
0x00007ffff7cbb434 <+1268>: sub %rdx,%rsi
0x00007ffff7cbb437 <+1271>: cmp $0x30,%rsi
0x00007ffff7cbb43e <+1278>: mov %rax,-0xa8(%rbp)
0x00007ffff7cbb445 <+1285>: mov %rcx,-0xb0(%rbp)
0x00007ffff7cbb44c <+1292>: mov %rsi,-0xb8(%rbp)
0x00007ffff7cbb453 <+1299>: jbe 0x7ffff7cbb494 <_D4core5cpuid8cpuidX86FZv+1364>
0x00007ffff7cbb455 <+1301>: mov 0x305aec(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb45c <+1308>: mov $0x2c8,%esi
0x00007ffff7cbb461 <+1313>: mov %rax,%rdi
0x00007ffff7cbb464 <+1316>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb469 <+1321>: mov 0x303b00(%rip),%rax # 0x7ffff7fbef70
0x00007ffff7cbb470 <+1328>: mov -0xa8(%rbp),%rcx
0x00007ffff7cbb477 <+1335>: mov -0xb0(%rbp),%rdx
0x00007ffff7cbb47e <+1342>: add %rdx,%rcx
0x00007ffff7cbb481 <+1345>: mov -0xb8(%rbp),%rsi
0x00007ffff7cbb488 <+1352>: sub %rdx,%rsi
0x00007ffff7cbb48b <+1355>: mov %rsi,(%rax)
0x00007ffff7cbb48e <+1358>: mov %rcx,0x8(%rax)
0x00007ffff7cbb492 <+1362>: jmp 0x7ffff7cbb4c2 <_D4core5cpuid8cpuidX86FZv+1410>
0x00007ffff7cbb494 <+1364>: mov -0xb0(%rbp),%rax
0x00007ffff7cbb49b <+1371>: mov -0xb8(%rbp),%rcx
0x00007ffff7cbb4a2 <+1378>: cmp %rcx,%rax
0x00007ffff7cbb4a5 <+1381>: jbe 0x7ffff7cbb469 <_D4core5cpuid8cpuidX86FZv+1321>
0x00007ffff7cbb4a7 <+1383>: jmp 0x7ffff7cbb455 <_D4core5cpuid8cpuidX86FZv+1301>
0x00007ffff7cbb4a9 <+1385>: lea 0x8569f(%rip),%rax # 0x7ffff7d40b4f <.str3>
0x00007ffff7cbb4b0 <+1392>: mov 0x303ab9(%rip),%rcx # 0x7ffff7fbef70
0x00007ffff7cbb4b7 <+1399>: mov %rax,0x8(%rcx)
0x00007ffff7cbb4bb <+1403>: movq $0xb,(%rcx)
0x00007ffff7cbb4c2 <+1410>: mov $0x0,%al
0x00007ffff7cbb4c4 <+1412>: mov 0x30584d(%rip),%rcx # 0x7ffff7fc0d18
0x00007ffff7cbb4cb <+1419>: cmpl $0x80000005,(%rcx)
0x00007ffff7cbb4d1 <+1425>: mov %al,-0xb9(%rbp)
0x00007ffff7cbb4d7 <+1431>: jne 0x7ffff7cbb4ef <_D4core5cpuid8cpuidX86FZv+1455>
0x00007ffff7cbb4d9 <+1433>: mov 0x303dc8(%rip),%rax # 0x7ffff7fbf2a8
0x00007ffff7cbb4e0 <+1440>: cmpl $0x2,(%rax)
0x00007ffff7cbb4e6 <+1446>: sete %cl
0x00007ffff7cbb4e9 <+1449>: mov %cl,-0xb9(%rbp)
0x00007ffff7cbb4ef <+1455>: mov -0xb9(%rbp),%al
0x00007ffff7cbb4f5 <+1461>: test $0x1,%al
---Type to continue, or q to quit---
0x00007ffff7cbb4f7 <+1463>: jne 0x7ffff7cbb4fb <_D4core5cpuid8cpuidX86FZv+1467>
0x00007ffff7cbb4f9 <+1465>: jmp 0x7ffff7cbb508 <_D4core5cpuid8cpuidX86FZv+1480>
0x00007ffff7cbb4fb <+1467>: mov 0x305816(%rip),%rax # 0x7ffff7fc0d18
0x00007ffff7cbb502 <+1474>: movl $0x80000004,(%rax)
0x00007ffff7cbb508 <+1480>: mov $0x1,%al
0x00007ffff7cbb50a <+1482>: test $0x1,%al
0x00007ffff7cbb50c <+1484>: jne 0x7ffff7cbb524 <_D4core5cpuid8cpuidX86FZv+1508>
0x00007ffff7cbb50e <+1486>: jmp 0x7ffff7cbb510 <_D4core5cpuid8cpuidX86FZv+1488>
0x00007ffff7cbb510 <+1488>: mov 0x305a31(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb517 <+1495>: mov $0x2db,%esi
0x00007ffff7cbb51c <+1500>: mov %rax,%rdi
0x00007ffff7cbb51f <+1503>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb524 <+1508>: mov $0x1,%al
0x00007ffff7cbb526 <+1510>: mov 0x303d7b(%rip),%rcx # 0x7ffff7fbf2a8
0x00007ffff7cbb52d <+1517>: mov 0x30576c(%rip),%rdx # 0x7ffff7fc0ca0
0x00007ffff7cbb534 <+1524>: movq $0x0,(%rdx)
0x00007ffff7cbb53b <+1531>: cmpl $0x2,(%rcx)
0x00007ffff7cbb541 <+1537>: mov %al,-0xba(%rbp)
0x00007ffff7cbb547 <+1543>: jb 0x7ffff7cbb55b <_D4core5cpuid8cpuidX86FZv+1563>
0x00007ffff7cbb549 <+1545>: mov 0x303aa8(%rip),%rax # 0x7ffff7fbeff8
0x00007ffff7cbb550 <+1552>: mov (%rax),%cl
0x00007ffff7cbb552 <+1554>: xor $0x1,%cl
0x00007ffff7cbb555 <+1557>: mov %cl,-0xba(%rbp)
0x00007ffff7cbb55b <+1563>: mov -0xba(%rbp),%al
0x00007ffff7cbb561 <+1569>: test $0x1,%al
0x00007ffff7cbb563 <+1571>: jne 0x7ffff7cbb56a <_D4core5cpuid8cpuidX86FZv+1578>
0x00007ffff7cbb565 <+1573>: jmpq 0x7ffff7cbb685 <_D4core5cpuid8cpuidX86FZv+1861>
0x00007ffff7cbb56a <+1578>: mov 0x3057a7(%rip),%rax # 0x7ffff7fc0d18
0x00007ffff7cbb571 <+1585>: cmpl $0x80000005,(%rax)
0x00007ffff7cbb577 <+1591>: jb 0x7ffff7cbb583 <_D4core5cpuid8cpuidX86FZv+1603>
0x00007ffff7cbb579 <+1593>: callq 0x7ffff7b50b20 _D4core5cpuid15getAMDcacheinfoFZv@plt
0x00007ffff7cbb57e <+1598>: jmpq 0x7ffff7cbb683 <_D4core5cpuid8cpuidX86FZv+1859>
0x00007ffff7cbb583 <+1603>: mov 0x30429e(%rip),%rax # 0x7ffff7fbf828
0x00007ffff7cbb58a <+1610>: testb $0x1,(%rax)
0x00007ffff7cbb58d <+1613>: jne 0x7ffff7cbb591 <_D4core5cpuid8cpuidX86FZv+1617>
0x00007ffff7cbb58f <+1615>: jmp 0x7ffff7cbb60a <_D4core5cpuid8cpuidX86FZv+1738>
0x00007ffff7cbb591 <+1617>: mov $0x1,%al
0x00007ffff7cbb593 <+1619>: test $0x1,%al
0x00007ffff7cbb595 <+1621>: jne 0x7ffff7cbb5ad <_D4core5cpuid8cpuidX86FZv+1645>
0x00007ffff7cbb597 <+1623>: jmp 0x7ffff7cbb599 <_D4core5cpuid8cpuidX86FZv+1625>
0x00007ffff7cbb599 <+1625>: mov 0x3059a8(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb5a0 <+1632>: mov $0x2e3,%esi
0x00007ffff7cbb5a5 <+1637>: mov %rax,%rdi
---Type to continue, or q to quit---
0x00007ffff7cbb5a8 <+1640>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb5ad <+1645>: mov $0x1,%al
0x00007ffff7cbb5af <+1647>: mov 0x3056ea(%rip),%rcx # 0x7ffff7fc0ca0
0x00007ffff7cbb5b6 <+1654>: movq $0x8,(%rcx)
0x00007ffff7cbb5bd <+1661>: test $0x1,%al
0x00007ffff7cbb5bf <+1663>: jne 0x7ffff7cbb5d5 <_D4core5cpuid8cpuidX86FZv+1685>
0x00007ffff7cbb5c1 <+1665>: mov 0x305980(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb5c8 <+1672>: mov $0x2e4,%esi
0x00007ffff7cbb5cd <+1677>: mov %rax,%rdi
0x00007ffff7cbb5d0 <+1680>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb5d5 <+1685>: mov $0x1,%al
0x00007ffff7cbb5d7 <+1687>: mov 0x3056c2(%rip),%rcx # 0x7ffff7fc0ca0
0x00007ffff7cbb5de <+1694>: movb $0x4,0x8(%rcx)
0x00007ffff7cbb5e2 <+1698>: test $0x1,%al
0x00007ffff7cbb5e4 <+1700>: jne 0x7ffff7cbb5fa <_D4core5cpuid8cpuidX86FZv+1722>
0x00007ffff7cbb5e6 <+1702>: mov 0x30595b(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb5ed <+1709>: mov $0x2e5,%esi
0x00007ffff7cbb5f2 <+1714>: mov %rax,%rdi
0x00007ffff7cbb5f5 <+1717>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb5fa <+1722>: mov 0x30569f(%rip),%rax # 0x7ffff7fc0ca0
0x00007ffff7cbb601 <+1729>: movl $0x20,0xc(%rax)
0x00007ffff7cbb608 <+1736>: jmp 0x7ffff7cbb681 <_D4core5cpuid8cpuidX86FZv+1857>
0x00007ffff7cbb60a <+1738>: mov $0x1,%al
0x00007ffff7cbb60c <+1740>: test $0x1,%al
0x00007ffff7cbb60e <+1742>: jne 0x7ffff7cbb626 <_D4core5cpuid8cpuidX86FZv+1766>
0x00007ffff7cbb610 <+1744>: jmp 0x7ffff7cbb612 <_D4core5cpuid8cpuidX86FZv+1746>
0x00007ffff7cbb612 <+1746>: mov 0x30592f(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb619 <+1753>: mov $0x2e9,%esi
0x00007ffff7cbb61e <+1758>: mov %rax,%rdi
0x00007ffff7cbb621 <+1761>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb626 <+1766>: mov $0x1,%al
0x00007ffff7cbb628 <+1768>: mov 0x305671(%rip),%rcx # 0x7ffff7fc0ca0
0x00007ffff7cbb62f <+1775>: movq $0x40,(%rcx)
0x00007ffff7cbb636 <+1782>: test $0x1,%al
0x00007ffff7cbb638 <+1784>: jne 0x7ffff7cbb64e <_D4core5cpuid8cpuidX86FZv+1806>
0x00007ffff7cbb63a <+1786>: mov 0x305907(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb641 <+1793>: mov $0x2ea,%esi
0x00007ffff7cbb646 <+1798>: mov %rax,%rdi
0x00007ffff7cbb649 <+1801>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb64e <+1806>: mov $0x1,%al
0x00007ffff7cbb650 <+1808>: mov 0x305649(%rip),%rcx # 0x7ffff7fc0ca0
0x00007ffff7cbb657 <+1815>: movb $0x4,0x8(%rcx)
0x00007ffff7cbb65b <+1819>: test $0x1,%al
---Type to continue, or q to quit---
0x00007ffff7cbb65d <+1821>: jne 0x7ffff7cbb673 <_D4core5cpuid8cpuidX86FZv+1843>
0x00007ffff7cbb65f <+1823>: mov 0x3058e2(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb666 <+1830>: mov $0x2eb,%esi
0x00007ffff7cbb66b <+1835>: mov %rax,%rdi
0x00007ffff7cbb66e <+1838>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb673 <+1843>: mov 0x305626(%rip),%rax # 0x7ffff7fc0ca0
0x00007ffff7cbb67a <+1850>: movl $0x20,0xc(%rax)
0x00007ffff7cbb681 <+1857>: jmp 0x7ffff7cbb683 <_D4core5cpuid8cpuidX86FZv+1859>
0x00007ffff7cbb683 <+1859>: jmp 0x7ffff7cbb685 <_D4core5cpuid8cpuidX86FZv+1861>
0x00007ffff7cbb685 <+1861>: mov $0x1,%al
0x00007ffff7cbb687 <+1863>: test $0x1,%al
0x00007ffff7cbb689 <+1865>: jne 0x7ffff7cbb6a1 <_D4core5cpuid8cpuidX86FZv+1889>
0x00007ffff7cbb68b <+1867>: jmp 0x7ffff7cbb68d <_D4core5cpuid8cpuidX86FZv+1869>
0x00007ffff7cbb68d <+1869>: mov 0x3058b4(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb694 <+1876>: mov $0x2ee,%esi
0x00007ffff7cbb699 <+1881>: mov %rax,%rdi
0x00007ffff7cbb69c <+1884>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb6a1 <+1889>: mov $0x0,%al
0x00007ffff7cbb6a3 <+1891>: mov 0x3055f6(%rip),%rcx # 0x7ffff7fc0ca0
0x00007ffff7cbb6aa <+1898>: cmpq $0x0,(%rcx)
0x00007ffff7cbb6b1 <+1905>: mov %al,-0xbb(%rbp)
0x00007ffff7cbb6b7 <+1911>: jne 0x7ffff7cbb6cf <_D4core5cpuid8cpuidX86FZv+1935>
0x00007ffff7cbb6b9 <+1913>: mov 0x303be8(%rip),%rax # 0x7ffff7fbf2a8
0x00007ffff7cbb6c0 <+1920>: cmpl $0x4,(%rax)
0x00007ffff7cbb6c6 <+1926>: setae %cl
0x00007ffff7cbb6c9 <+1929>: mov %cl,-0xbb(%rbp)
0x00007ffff7cbb6cf <+1935>: mov -0xbb(%rbp),%al
0x00007ffff7cbb6d5 <+1941>: test $0x1,%al
0x00007ffff7cbb6d7 <+1943>: jne 0x7ffff7cbb6db <_D4core5cpuid8cpuidX86FZv+1947>
0x00007ffff7cbb6d9 <+1945>: jmp 0x7ffff7cbb6e0 <_D4core5cpuid8cpuidX86FZv+1952>
0x00007ffff7cbb6db <+1947>: callq 0x7ffff7b4aff0 _D4core5cpuid18getcacheinfoCPUID4FZv@plt
0x00007ffff7cbb6e0 <+1952>: mov $0x1,%al
0x00007ffff7cbb6e2 <+1954>: test $0x1,%al
0x00007ffff7cbb6e4 <+1956>: jne 0x7ffff7cbb6fc <_D4core5cpuid8cpuidX86FZv+1980>
0x00007ffff7cbb6e6 <+1958>: jmp 0x7ffff7cbb6e8 <_D4core5cpuid8cpuidX86FZv+1960>
0x00007ffff7cbb6e8 <+1960>: mov 0x305859(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb6ef <+1967>: mov $0x2f1,%esi
0x00007ffff7cbb6f4 <+1972>: mov %rax,%rdi
0x00007ffff7cbb6f7 <+1975>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb6fc <+1980>: mov $0x0,%al
0x00007ffff7cbb6fe <+1982>: mov 0x30559b(%rip),%rcx # 0x7ffff7fc0ca0
0x00007ffff7cbb705 <+1989>: cmpq $0x0,(%rcx)
0x00007ffff7cbb70c <+1996>: mov %al,-0xbc(%rbp)
---Type to continue, or q to quit---
0x00007ffff7cbb712 <+2002>: jne 0x7ffff7cbb72a <_D4core5cpuid8cpuidX86FZv+2026>
0x00007ffff7cbb714 <+2004>: mov 0x303b8d(%rip),%rax # 0x7ffff7fbf2a8
0x00007ffff7cbb71b <+2011>: cmpl $0x2,(%rax)
0x00007ffff7cbb721 <+2017>: setae %cl
0x00007ffff7cbb724 <+2020>: mov %cl,-0xbc(%rbp)
0x00007ffff7cbb72a <+2026>: mov -0xbc(%rbp),%al
0x00007ffff7cbb730 <+2032>: test $0x1,%al
0x00007ffff7cbb732 <+2034>: jne 0x7ffff7cbb736 <_D4core5cpuid8cpuidX86FZv+2038>
0x00007ffff7cbb734 <+2036>: jmp 0x7ffff7cbb73b <_D4core5cpuid8cpuidX86FZv+2043>
0x00007ffff7cbb736 <+2038>: callq 0x7ffff7b56660 _D4core5cpuid18getcacheinfoCPUID2FZv@plt
0x00007ffff7cbb73b <+2043>: mov $0x1,%al
0x00007ffff7cbb73d <+2045>: test $0x1,%al
0x00007ffff7cbb73f <+2047>: jne 0x7ffff7cbb757 <_D4core5cpuid8cpuidX86FZv+2071>
0x00007ffff7cbb741 <+2049>: jmp 0x7ffff7cbb743 <_D4core5cpuid8cpuidX86FZv+2051>
0x00007ffff7cbb743 <+2051>: mov 0x3057fe(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb74a <+2058>: mov $0x2f4,%esi
0x00007ffff7cbb74f <+2063>: mov %rax,%rdi
0x00007ffff7cbb752 <+2066>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb757 <+2071>: mov 0x305542(%rip),%rax # 0x7ffff7fc0ca0
0x00007ffff7cbb75e <+2078>: cmpq $0x0,(%rax)
0x00007ffff7cbb765 <+2085>: jne 0x7ffff7cbb868 <_D4core5cpuid8cpuidX86FZv+2344>
0x00007ffff7cbb76b <+2091>: callq 0x7ffff7b50830 _D4core5cpuid3mmxFNdZb@plt
0x00007ffff7cbb770 <+2096>: test $0x1,%al
0x00007ffff7cbb772 <+2098>: jne 0x7ffff7cbb776 <_D4core5cpuid8cpuidX86FZv+2102>
0x00007ffff7cbb774 <+2100>: jmp 0x7ffff7cbb7ef <_D4core5cpuid8cpuidX86FZv+2223>
0x00007ffff7cbb776 <+2102>: mov $0x1,%al
0x00007ffff7cbb778 <+2104>: test $0x1,%al
0x00007ffff7cbb77a <+2106>: jne 0x7ffff7cbb792 <_D4core5cpuid8cpuidX86FZv+2130>
0x00007ffff7cbb77c <+2108>: jmp 0x7ffff7cbb77e <_D4core5cpuid8cpuidX86FZv+2110>
0x00007ffff7cbb77e <+2110>: mov 0x3057c3(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb785 <+2117>: mov $0x2f7,%esi
0x00007ffff7cbb78a <+2122>: mov %rax,%rdi
0x00007ffff7cbb78d <+2125>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb792 <+2130>: mov $0x1,%al
0x00007ffff7cbb794 <+2132>: mov 0x305505(%rip),%rcx # 0x7ffff7fc0ca0
0x00007ffff7cbb79b <+2139>: movq $0x10,(%rcx)
0x00007ffff7cbb7a2 <+2146>: test $0x1,%al
0x00007ffff7cbb7a4 <+2148>: jne 0x7ffff7cbb7ba <_D4core5cpuid8cpuidX86FZv+2170>
0x00007ffff7cbb7a6 <+2150>: mov 0x30579b(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb7ad <+2157>: mov $0x2f8,%esi
0x00007ffff7cbb7b2 <+2162>: mov %rax,%rdi
0x00007ffff7cbb7b5 <+2165>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb7ba <+2170>: mov $0x1,%al
---Type to continue, or q to quit---
0x00007ffff7cbb7bc <+2172>: mov 0x3054dd(%rip),%rcx # 0x7ffff7fc0ca0
0x00007ffff7cbb7c3 <+2179>: movb $0x4,0x8(%rcx)
0x00007ffff7cbb7c7 <+2183>: test $0x1,%al
0x00007ffff7cbb7c9 <+2185>: jne 0x7ffff7cbb7df <_D4core5cpuid8cpuidX86FZv+2207>
0x00007ffff7cbb7cb <+2187>: mov 0x305776(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb7d2 <+2194>: mov $0x2f9,%esi
0x00007ffff7cbb7d7 <+2199>: mov %rax,%rdi
0x00007ffff7cbb7da <+2202>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb7df <+2207>: mov 0x3054ba(%rip),%rax # 0x7ffff7fc0ca0
0x00007ffff7cbb7e6 <+2214>: movl $0x20,0xc(%rax)
0x00007ffff7cbb7ed <+2221>: jmp 0x7ffff7cbb866 <_D4core5cpuid8cpuidX86FZv+2342>
0x00007ffff7cbb7ef <+2223>: mov $0x1,%al
0x00007ffff7cbb7f1 <+2225>: test $0x1,%al
0x00007ffff7cbb7f3 <+2227>: jne 0x7ffff7cbb80b <_D4core5cpuid8cpuidX86FZv+2251>
0x00007ffff7cbb7f5 <+2229>: jmp 0x7ffff7cbb7f7 <_D4core5cpuid8cpuidX86FZv+2231>
0x00007ffff7cbb7f7 <+2231>: mov 0x30574a(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb7fe <+2238>: mov $0x2fd,%esi
0x00007ffff7cbb803 <+2243>: mov %rax,%rdi
0x00007ffff7cbb806 <+2246>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb80b <+2251>: mov $0x1,%al
0x00007ffff7cbb80d <+2253>: mov 0x30548c(%rip),%rcx # 0x7ffff7fc0ca0
0x00007ffff7cbb814 <+2260>: movq $0x8,(%rcx)
0x00007ffff7cbb81b <+2267>: test $0x1,%al
0x00007ffff7cbb81d <+2269>: jne 0x7ffff7cbb833 <_D4core5cpuid8cpuidX86FZv+2291>
0x00007ffff7cbb81f <+2271>: mov 0x305722(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb826 <+2278>: mov $0x2fe,%esi
0x00007ffff7cbb82b <+2283>: mov %rax,%rdi
0x00007ffff7cbb82e <+2286>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb833 <+2291>: mov $0x1,%al
0x00007ffff7cbb835 <+2293>: mov 0x305464(%rip),%rcx # 0x7ffff7fc0ca0
0x00007ffff7cbb83c <+2300>: movb $0x2,0x8(%rcx)
0x00007ffff7cbb840 <+2304>: test $0x1,%al
0x00007ffff7cbb842 <+2306>: jne 0x7ffff7cbb858 <_D4core5cpuid8cpuidX86FZv+2328>
0x00007ffff7cbb844 <+2308>: mov 0x3056fd(%rip),%rax # 0x7ffff7fc0f48
0x00007ffff7cbb84b <+2315>: mov $0x2ff,%esi
0x00007ffff7cbb850 <+2320>: mov %rax,%rdi
0x00007ffff7cbb853 <+2323>: callq 0x7ffff7b56450 _d_array_bounds@plt
0x00007ffff7cbb858 <+2328>: mov 0x305441(%rip),%rax # 0x7ffff7fc0ca0
0x00007ffff7cbb85f <+2335>: movl $0x20,0xc(%rax)
0x00007ffff7cbb866 <+2342>: jmp 0x7ffff7cbb868 <_D4core5cpuid8cpuidX86FZv+2344>
0x00007ffff7cbb868 <+2344>: mov 0x303a39(%rip),%rax # 0x7ffff7fbf2a8
0x00007ffff7cbb86f <+2351>: cmpl $0xb,(%rax)
0x00007ffff7cbb875 <+2357>: jb 0x7ffff7cbb87e <_D4core5cpuid8cpuidX86FZv+2366>
---Type to continue, or q to quit---
0x00007ffff7cbb877 <+2359>: callq 0x7ffff7b53920 _D4core5cpuid12getCpuInfo0BFZv@plt
0x00007ffff7cbb87c <+2364>: jmp 0x7ffff7cbb8b4 <_D4core5cpuid8cpuidX86FZv+2420>
0x00007ffff7cbb87e <+2366>: callq 0x7ffff7b4fca0 _D4core5cpuid17hyperThreadingBitFNdZb@plt
0x00007ffff7cbb883 <+2371>: test $0x1,%al
0x00007ffff7cbb885 <+2373>: jne 0x7ffff7cbb889 <_D4core5cpuid8cpuidX86FZv+2377>
0x00007ffff7cbb887 <+2375>: jmp 0x7ffff7cbb8a0 <_D4core5cpuid8cpuidX86FZv+2400>
0x00007ffff7cbb889 <+2377>: mov 0x304098(%rip),%rax # 0x7ffff7fbf928
0x00007ffff7cbb890 <+2384>: mov -0x28(%rbp),%ecx
0x00007ffff7cbb893 <+2387>: shr $0x10,%ecx
0x00007ffff7cbb896 <+2390>: and $0xff,%ecx
0x00007ffff7cbb89c <+2396>: mov %ecx,(%rax)
0x00007ffff7cbb89e <+2398>: jmp 0x7ffff7cbb8b2 <_D4core5cpuid8cpuidX86FZv+2418>
0x00007ffff7cbb8a0 <+2400>: mov 0x304081(%rip),%rax # 0x7ffff7fbf928
0x00007ffff7cbb8a7 <+2407>: mov 0x304652(%rip),%rcx # 0x7ffff7fbff00
0x00007ffff7cbb8ae <+2414>: mov (%rcx),%edx
0x00007ffff7cbb8b0 <+2416>: mov %edx,(%rax)
0x00007ffff7cbb8b2 <+2418>: jmp 0x7ffff7cbb8b4 <_D4core5cpuid8cpuidX86FZv+2420>
0x00007ffff7cbb8b4 <+2420>: add $0xb8,%rsp
0x00007ffff7cbb8bb <+2427>: pop %rbx
0x00007ffff7cbb8bc <+2428>: pop %rbp
0x00007ffff7cbb8bd <+2429>: retq
End of assembler dump.
(gdb)

@kefahi
Copy link
Author

kefahi commented Oct 12, 2012

Here is the backtrace ... in case its useful :
(gdb) bt
#0 core.cpuid.cpuidX86() () at cpuid.d:610
#1 0x00007ffff7cbbd58 in core.cpuid._sharedStaticCtor1() () at cpuid.d:870
#2 0x00007ffff7cf8771 in rt.minfo.ModuleGroup.runCtors() (modules=...) at minfo.d:263
#3 0x00007ffff7cf736f in rt.minfo.ModuleGroup.runCtors() (this=...) at minfo.d:80
#4 0x00007ffff7cf7770 in rt_moduleCtor () at minfo.d:164
#5 0x00007ffff7cfd82b in rt.dmain2.main() () at dmain2.d:553
#6 0x00007ffff7cfd77c in rt.dmain2.main() () at dmain2.d:521
#7 0x00007ffff7cfd6ee in main (argc=1, argv=0x7fffffffe098) at /home/kefah/Downloads/ldc/.:565
#8 0x0000003d4d421a05 in __libc_start_main (main=0x4008d0 main@plt, argc=1, ubp_av=0x7fffffffe098, init=, fini=, rtld_fini=,
stack_end=0x7fffffffe088) at libc-start.c:225
#9 0x0000000000400949 in _start ()
(gdb)

@dnadlinger
Copy link
Member

@bioinfornatics: In this case, please consider switching the Fedora build to static libraries for now. Shared libraries are not really supported anyway (at least if you link together more than a single D module, weird things can happen).

As for what causes the issue, I'm not really sure. The crash indeed happens on the assignment to xfeatures – seems like something is wrong with the relocations?

@bioinfornatics
Copy link
Contributor

@klickverbot it seem is an intel issue more than fedora x86_64 as with my AMD proc i do not have this problem

@kefahi
Copy link
Author

kefahi commented Oct 13, 2012

I'm confirming that repacking the very rpms of Fedora 18 (from its source rpm) with static compilation instead of shared, indeed solves the problem.

I only modified the spec file and built the rpms ...

--- SPECS/ldc.spec.old 2012-10-13 06:51:54.794346117 +0300
+++ SPECS/ldc.spec 2012-10-13 07:02:45.461434624 +0300
@@ -161,7 +161,7 @@
mkdir geany_config

%build
-%cmake -DMULTILIB:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/d .
+%cmake -DMULTILIB:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/d .
make %{?_smp_mflags} VERBOSE=2 phobos2

generate geany tags

@@ -201,25 +201,21 @@

%files druntime
%doc runtime/druntime/LICENSE runtime/druntime/README
-%{_libdir}/libdruntime-ldc.so.2.0.60
-%{_libdir}/libdruntime-ldc.so.60
+%{_libdir}/libdruntime-ldc.a

%files druntime-devel
%{_includedir}/d/ldc
%{_includedir}/d/core
-%{_libdir}/libdruntime-ldc.so

%files phobos
%doc runtime/phobos/LICENSE_1_0.txt
-%{_libdir}/libphobos-ldc.so.2.0.60
-%{_libdir}/libphobos-ldc.so.60
+%{_libdir}/libphobos-ldc.a

%files phobos-devel
%{_includedir}/d
%{_includedir}/d/crc32.d
%{_includedir}/d/std
%{_includedir}/d/etc
-%{_libdir}/libphobos-ldc.so

%files phobos-geany-tags
%{_datadir}/geany/tags/phobos.d.tags

@dnadlinger
Copy link
Member

@bioinfornatics: Can you please switch the Fedora packages back over to static libraries? We won't officially support dynamic library builds anyway as long as they are not supported by upstream druntime, and LDC not working at all on certain systems for questionable benefits is just unacceptable.

@kefah: Unfortunately, neither me nor any of the other devs seems to be able to reproduce it on their system, so if you are into low-level stuff, then it would be great if you could try to figure out what exactly is going wrong. If not, I guess we have to leave this issue for now and revisit it when druntime gets workable shared library support.

@John-Colvin
Copy link
Contributor

I get the same segfault on both Mint 13 and Fedora 17 with an intel core 2 quad Q9550

Pity, the entire reason I was moving over to ldc was for the shared libraries.

@bioinfornatics
Copy link
Contributor

yes i think shared lib has a bad support for intel processor
I will try to move fedora ldc to static

@dnadlinger
Copy link
Member

Should be fixed in Git master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants