Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Hans_v_
Beginner
167 Views

xmm16 used without specifying AVX512

I have a weird issue that I don't understand. One of my customers has a problem with my software (it crashes immediately on startup, with a c000001d - invalid instruction - exception). Unfortunately I have no access to the system on which it happens.

OS: Microsoft Server 2012 R2 with Hyper-V inside Microsoft Server 2016
CPU: Intel Xeon Silver 4108 CPU @ 1,80Hz, which supports AVX512.

Binary created with Intel Compiler 17.0 inside Visual Studio 2015.
64 bit, minimum supported target needs to have SSE2 (/arch:SSE2), with optional paths for SSE4.1, 4.2, AVX and AVX2: /QaxSSE4.1 /QaxSSE4.2 /QaxAVX /QaxCORE-AVX-I /QaxCORE-AVX2.

The customer ran a debugger and the code crashes on an instruction that attempts to use the xmm16 register, which only exists in AVX512. I'm not building for AVX512, so I don't understand why it would generate such an instruction. Also, MS Server 2012 doesn't support AVX512 so any checking code should have protected against reaching this instruction (MS Server 2016 and the CPU both do support AVX512 though).

Unfortunately my customer has no access to the Server 2016 system so he hasn't been able to test if the software runs fine outside of the Server 2012 host.

The instruction it crashes on:

00007ff7`e76c2626 62817e08100498  vmovss  xmm16,dword ptr [r8+r11*4] ds:00007ff7`e862e320=3ec3ef15

 

0 Kudos
2 Replies
Hans_v_
Beginner
167 Views

Looking further into it I managed to find the same spot on my own pc, and I think it's IPP code. Since there are a lot of calls in the vicinity calling stuff like k0_owns_initTabTwd_L1_32f. The address of the crash is 00007FF6EF0A2626. (Which my own debugger apparently can't decipher).

00007FF6EF0A2332 EB 3E                jmp         k0_owns_initTabTwd_L1_32f+0D52h (07FF6EF0A2372h)  
00007FF6EF0A2334 47 8D 0C 23          lea         r9d,[r11+r12]  
00007FF6EF0A2338 41 F7 D9             neg         r9d  
00007FF6EF0A233B 4D 63 C9             movsxd      r9,r9d  
00007FF6EF0A233E C4 A1 7A 10 04 8F    vmovss      xmm0,dword ptr [rdi+r9*4]  
00007FF6EF0A2344 44 8B 8C 24 D8 02 00 00 mov         r9d,dword ptr [rsp+2D8h]  
00007FF6EF0A234C C5 F8 57 0D BC A7 CB 00 vxorps      xmm1,xmm0,xmmword ptr [string L"ERROR : Unable to in"...+16400h (07FF6EFD5CB10h)]  
00007FF6EF0A2354 C5 FA 11 4A 40       vmovss      dword ptr [rdx+40h],xmm1  
00007FF6EF0A2359 45 03 CC             add         r9d,r12d  
00007FF6EF0A235C 4D 63 C9             movsxd      r9,r9d  
00007FF6EF0A235F C4 A1 7A 10 14 8F    vmovss      xmm2,dword ptr [rdi+r9*4]  
00007FF6EF0A2365 C5 E8 57 1D A3 A7 CB 00 vxorps      xmm3,xmm2,xmmword ptr [string L"ERROR : Unable to in"...+16400h (07FF6EFD5CB10h)]  
00007FF6EF0A236D C5 FA 11 5A 60       vmovss      dword ptr [rdx+60h],xmm3  
00007FF6EF0A2372 46 8D 0C 36          lea         r9d,[rsi+r14]  
00007FF6EF0A2376 44 3B C8             cmp         r9d,eax  
00007FF6EF0A2379 7F 3A                jg          k0_owns_initTabTwd_L1_32f+0D95h (07FF6EF0A23B5h)  
00007FF6EF0A237B 44 8B 8C 24 D0 02 00 00 mov         r9d,dword ptr [rsp+2D0h]  
00007FF6EF0A2383 45 03 CF             add         r9d,r15d  
00007FF6EF0A2386 4D 63 C9             movsxd      r9,r9d  
00007FF6EF0A2389 46 8B 0C 8F          mov         r9d,dword ptr [rdi+r9*4]  
00007FF6EF0A238D 44 89 8A 80 00 00 00 mov         dword ptr [rdx+80h],r9d  
00007FF6EF0A2394 44 8B 8C 24 B8 02 00 00 mov         r9d,dword ptr [rsp+2B8h]  
00007FF6EF0A239C 45 03 CD             add         r9d,r13d  
00007FF6EF0A239F 4D 63 C9             movsxd      r9,r9d  
00007FF6EF0A23A2 C4 A1 7A 10 04 8F    vmovss      xmm0,dword ptr [rdi+r9*4]  
00007FF6EF0A23A8 C5 F8 57 05 60 A7 CB 00 vxorps      xmm0,xmm0,xmmword ptr [string L"ERROR : Unable to in"...+16400h (07FF6EFD5CB10h)]  
00007FF6EF0A23B0 E9 8A 00 00 00       jmp         k0_owns_initTabTwd_L1_32f+0E1Fh (07FF6EF0A243Fh)  
00007FF6EF0A23B5 44 3B 8C 24 C8 02 00 00 cmp         r9d,dword ptr [rsp+2C8h]  
00007FF6EF0A23BD 7F 45                jg          k0_owns_initTabTwd_L1_32f+0DE4h (07FF6EF0A2404h)  
00007FF6EF0A23BF 44 8B 8C 24 D0 02 00 00 mov         r9d,dword ptr [rsp+2D0h]  
00007FF6EF0A23C7 45 03 CF             add         r9d,r15d  
00007FF6EF0A23CA 41 F7 D9             neg         r9d  
00007FF6EF0A23CD 4D 63 C9             movsxd      r9,r9d  
00007FF6EF0A23D0 C4 A1 7A 10 04 8F    vmovss      xmm0,dword ptr [rdi+r9*4]  
00007FF6EF0A23D6 44 8B 8C 24 60 02 00 00 mov         r9d,dword ptr [rsp+260h]  
00007FF6EF0A23DE C5 F8 57 0D 2A A7 CB 00 vxorps      xmm1,xmm0,xmmword ptr [string L"ERROR : Unable to in"...+16400h (07FF6EFD5CB10h)]  
00007FF6EF0A23E6 C5 FA 11 8A 80 00 00 00 vmovss      dword ptr [rdx+80h],xmm1  
00007FF6EF0A23EE 45 03 CF             add         r9d,r15d  
00007FF6EF0A23F1 4D 63 C9             movsxd      r9,r9d  
00007FF6EF0A23F4 C4 A1 7A 10 14 8F    vmovss      xmm2,dword ptr [rdi+r9*4]  
00007FF6EF0A23FA C5 E8 57 05 0E A7 CB 00 vxorps      xmm0,xmm2,xmmword ptr [string L"ERROR : Unable to in"...+16400h (07FF6EFD5CB10h)]  
00007FF6EF0A2402 EB 3B                jmp         k0_owns_initTabTwd_L1_32f+0E1Fh (07FF6EF0A243Fh)  
00007FF6EF0A2404 44 8B 8C 24 68 02 00 00 mov         r9d,dword ptr [rsp+268h]  
00007FF6EF0A240C 45 03 CF             add         r9d,r15d  
00007FF6EF0A240F 4D 63 C9             movsxd      r9,r9d  
00007FF6EF0A2412 C4 A1 7A 10 04 8F    vmovss      xmm0,dword ptr [rdi+r9*4]  
00007FF6EF0A2418 44 8B 8C 24 60 02 00 00 mov         r9d,dword ptr [rsp+260h]  
00007FF6EF0A2420 C5 F8 57 0D E8 A6 CB 00 vxorps      xmm1,xmm0,xmmword ptr [string L"ERROR : Unable to in"...+16400h (07FF6EFD5CB10h)]  
00007FF6EF0A2428 C5 FA 11 8A 80 00 00 00 vmovss      dword ptr [rdx+80h],xmm1  
00007FF6EF0A2430 45 03 CF             add         r9d,r15d  
00007FF6EF0A2433 41 F7 D9             neg         r9d  
00007FF6EF0A2436 4D 63 C9             movsxd      r9,r9d  
00007FF6EF0A2439 C4 A1 7A 10 04 8F    vmovss      xmm0,dword ptr [rdi+r9*4]  
00007FF6EF0A243F 44 8B 8C 24 08 03 00 00 mov         r9d,dword ptr [rsp+308h]  
00007FF6EF0A2447 41 FF C0             inc         r8d  
00007FF6EF0A244A 48 03 8C 24 F8 02 00 00 add         rcx,qword ptr [rsp+2F8h]  
00007FF6EF0A2452 41 83 C6 03          add         r14d,3  
00007FF6EF0A2456 48 03 AC 24 00 03 00 00 add         rbp,qword ptr [rsp+300h]  
00007FF6EF0A245E 44 03 A4 24 E8 02 00 00 add         r12d,dword ptr [rsp+2E8h]  
00007FF6EF0A2466 47 8D 14 4A          lea         r10d,[r10+r9*2]  
00007FF6EF0A246A 44 03 BC 24 E0 02 00 00 add         r15d,dword ptr [rsp+2E0h]  
00007FF6EF0A2472 44 03 AC 24 F0 02 00 00 add         r13d,dword ptr [rsp+2F0h]  
00007FF6EF0A247A C5 FA 11 82 A0 00 00 00 vmovss      dword ptr [rdx+0A0h],xmm0  
00007FF6EF0A2482 48 83 C2 04          add         rdx,4  
00007FF6EF0A2486 41 83 F8 08          cmp         r8d,8  
00007FF6EF0A248A 0F 82 50 FE FF FF    jb          k0_owns_initTabTwd_L1_32f+0CC0h (07FF6EF0A22E0h)  
00007FF6EF0A2490 44 8B 94 24 F0 02 00 00 mov         r10d,dword ptr [rsp+2F0h]  
00007FF6EF0A2498 83 C3 10             add         ebx,10h  
00007FF6EF0A249B 44 8B 84 24 B8 02 00 00 mov         r8d,dword ptr [rsp+2B8h]  
00007FF6EF0A24A3 83 C6 18             add         esi,18h  
00007FF6EF0A24A6 44 89 C9             mov         ecx,r9d  
00007FF6EF0A24A9 8B 94 24 A8 01 00 00 mov         edx,dword ptr [rsp+1A8h]  
00007FF6EF0A24B0 8B AC 24 C0 02 00 00 mov         ebp,dword ptr [rsp+2C0h]  
00007FF6EF0A24B7 47 8D 1C D0          lea         r11d,[r8+r10*8]  
00007FF6EF0A24BB 8B 84 24 F0 01 00 00 mov         eax,dword ptr [rsp+1F0h]  
00007FF6EF0A24C2 44 8B 8C 24 E8 01 00 00 mov         r9d,dword ptr [rsp+1E8h]  
00007FF6EF0A24CA 44 8B A4 24 A0 01 00 00 mov         r12d,dword ptr [rsp+1A0h]  
00007FF6EF0A24D2 41 FF C4             inc         r12d  
00007FF6EF0A24D5 03 94 24 88 01 00 00 add         edx,dword ptr [rsp+188h]  
00007FF6EF0A24DC 03 AC 24 98 01 00 00 add         ebp,dword ptr [rsp+198h]  
00007FF6EF0A24E3 48 81 84 24 D8 01 00 00 C0 00 00 00 add         qword ptr [rsp+1D8h],0C0h  
00007FF6EF0A24EF 44 03 8C 24 80 01 00 00 add         r9d,dword ptr [rsp+180h]  
00007FF6EF0A24F7 03 84 24 78 01 00 00 add         eax,dword ptr [rsp+178h]  
00007FF6EF0A24FE 8B BC 24 E0 01 00 00 mov         edi,dword ptr [rsp+1E0h]  
00007FF6EF0A2505 89 94 24 A8 01 00 00 mov         dword ptr [rsp+1A8h],edx  
00007FF6EF0A250C 8D 3C CF             lea         edi,[rdi+rcx*8]  
00007FF6EF0A250F 89 AC 24 C0 02 00 00 mov         dword ptr [rsp+2C0h],ebp  
00007FF6EF0A2516 44 89 9C 24 B8 02 00 00 mov         dword ptr [rsp+2B8h],r11d  
00007FF6EF0A251E 44 89 A4 24 A0 01 00 00 mov         dword ptr [rsp+1A0h],r12d  
00007FF6EF0A2526 44 3B A4 24 90 01 00 00 cmp         r12d,dword ptr [rsp+190h]  
00007FF6EF0A252E 0F 82 0C FD FF FF    jb          k0_owns_initTabTwd_L1_32f+0C20h (07FF6EF0A2240h)  
00007FF6EF0A2534 8B 54 24 68          mov         edx,dword ptr [rsp+68h]  
00007FF6EF0A2538 41 BA 01 00 00 00    mov         r10d,1  
00007FF6EF0A253E 8B 6C 24 70          mov         ebp,dword ptr [rsp+70h]  
00007FF6EF0A2542 48 8B 8C 24 D8 01 00 00 mov         rcx,qword ptr [rsp+1D8h]  
00007FF6EF0A254A 4C 8B 84 24 D0 01 00 00 mov         r8,qword ptr [rsp+1D0h]  
00007FF6EF0A2552 3B AC 24 80 00 00 00 cmp         ebp,dword ptr [rsp+80h]  
00007FF6EF0A2559 0F 8C 61 F1 FF FF    jl          k0_owns_initTabTwd_L1_32f+0A0h (07FF6EF0A16C0h)  
00007FF6EF0A255F 8B 44 24 30          mov         eax,dword ptr [rsp+30h]  
00007FF6EF0A2563 4C 8B 4C 24 28       mov         r9,qword ptr [rsp+28h]  
00007FF6EF0A2568 48 8B 5C 24 38       mov         rbx,qword ptr [rsp+38h]  
00007FF6EF0A256D 48 8B 74 24 40       mov         rsi,qword ptr [rsp+40h]  
00007FF6EF0A2572 48 8B 7C 24 48       mov         rdi,qword ptr [rsp+48h]  
00007FF6EF0A2577 4C 8B 64 24 50       mov         r12,qword ptr [rsp+50h]  
00007FF6EF0A257C 4C 8B 6C 24 58       mov         r13,qword ptr [rsp+58h]  
00007FF6EF0A2581 4C 8B 74 24 60       mov         r14,qword ptr [rsp+60h]  
00007FF6EF0A2586 48 63 C0             movsxd      rax,eax  
00007FF6EF0A2589 49 8D 04 C1          lea         rax,[r9+rax*8]  
00007FF6EF0A258D 48 89 C2             mov         rdx,rax  
00007FF6EF0A2590 48 83 E2 3F          and         rdx,3Fh  
00007FF6EF0A2594 48 F7 DA             neg         rdx  
00007FF6EF0A2597 48 83 E2 3F          and         rdx,3Fh  
00007FF6EF0A259B 48 03 C2             add         rax,rdx  
00007FF6EF0A259E 48 81 C4 18 03 00 00 add         rsp,318h  
00007FF6EF0A25A5 5D                   pop         rbp  
00007FF6EF0A25A6 41 5F                pop         r15  
00007FF6EF0A25A8 C3                   ret  
00007FF6EF0A25A9 46 8D 0C A5 00 00 00 00 lea         r9d,[r12*4]  
00007FF6EF0A25B1 4D 63 C9             movsxd      r9,r9d  
00007FF6EF0A25B4 43 8D 34 24          lea         esi,[r12+r12]  
00007FF6EF0A25B8 44 89 CB             mov         ebx,r9d  
00007FF6EF0A25BB 44 89 CF             mov         edi,r9d  
00007FF6EF0A25BE 41 2B DC             sub         ebx,r12d  
00007FF6EF0A25C1 2B FE                sub         edi,esi  
00007FF6EF0A25C3 48 63 DB             movsxd      rbx,ebx  
00007FF6EF0A25C6 47 8B 2C 88          mov         r13d,dword ptr [r8+r9*4]  
00007FF6EF0A25CA 44 89 29             mov         dword ptr [rcx],r13d  
00007FF6EF0A25CD C4 C1 7A 10 00       vmovss      xmm0,dword ptr [r8]  
00007FF6EF0A25D2 C5 F8 57 0D 36 A5 CB 00 vxorps      xmm1,xmm0,xmmword ptr [string L"ERROR : Unable to in"...+16400h (07FF6EFD5CB10h)]  
00007FF6EF0A25DA C5 FA 11 49 10       vmovss      dword ptr [rcx+10h],xmm1  
00007FF6EF0A25DF 47 8B 34 88          mov         r14d,dword ptr [r8+r9*4]  
00007FF6EF0A25E3 44 89 71 20          mov         dword ptr [rcx+20h],r14d  
00007FF6EF0A25E7 C4 C1 7A 10 10       vmovss      xmm2,dword ptr [r8]  
00007FF6EF0A25EC C5 E8 57 1D 1C A5 CB 00 vxorps      xmm3,xmm2,xmmword ptr [string L"ERROR : Unable to in"...+16400h (07FF6EFD5CB10h)]  
00007FF6EF0A25F4 C5 FA 11 59 30       vmovss      dword ptr [rcx+30h],xmm3  
00007FF6EF0A25F9 47 8B 3C 88          mov         r15d,dword ptr [r8+r9*4]  
00007FF6EF0A25FD 44 89 79 40          mov         dword ptr [rcx+40h],r15d  
00007FF6EF0A2601 C4 C1 7A 10 20       vmovss      xmm4,dword ptr [r8]  
00007FF6EF0A2606 C5 D8 57 2D 02 A5 CB 00 vxorps      xmm5,xmm4,xmmword ptr [string L"ERROR : Unable to in"...+16400h (07FF6EFD5CB10h)]  
00007FF6EF0A260E C5 FA 11 69 50       vmovss      dword ptr [rcx+50h],xmm5  
00007FF6EF0A2613 41 8B 04 98          mov         eax,dword ptr [r8+rbx*4]  
00007FF6EF0A2617 43 8D 1C 64          lea         ebx,[r12+r12*2]  
00007FF6EF0A261B 89 41 04             mov         dword ptr [rcx+4],eax  
00007FF6EF0A261E 44 89 C8             mov         eax,r9d  
00007FF6EF0A2621 48 63 FF             movsxd      rdi,edi  
00007FF6EF0A2624 2B C3                sub         eax,ebx  
00007FF6EF0A2626 ??                   ?? ?? 
00007FF6EF0A2627 81 7E 08 10 04 98 62 cmp         dword ptr [rsi+8],62980410h  
00007FF6EF0A262E E1 7C                loope       k0_owns_initTabTwd_L1_32f+108Ch (07FF6EF0A26ACh)  
00007FF6EF0A2630 00 57 0D             add         byte ptr [rdi+0Dh],dl  
00007FF6EF0A2633 D9 A4 CB 00 48 63 F6 fldenv      [rbx+rcx*8-99CB800h]  
00007FF6EF0A263A ??                   ?? ?? 

 

Hans_v_
Beginner
167 Views

Reply