Skip to content

misc/cgo/test: test fails on windows-386 #4872

Closed
@alexbrainman

Description

@alexbrainman
misc/cgo/test fails after this change https://golang.org/cl/7304104/

test crashes sometimes. Perhaps, this will help you:

(gdb) disas
Dump of assembler code for function runtime.usleep:
    0x00416680 <+0>:     mov    %fs:0x14,%ecx
=> 0x00416687 <+7>:     mov    (%ecx),%ecx
    0x00416689 <+9>:     cmp    (%ecx),%esp
    0x0041668b <+11>:    ja     0x416699 <runtime.usleep+25>
    0x0041668d <+13>:    xor    %edx,%edx
    0x0041668f <+15>:    mov    $0x4,%eax
    0x00416694 <+20>:    call   0x41c470 <runtime.morestack>
    0x00416699 <+25>:    sub    $0xc,%esp
    0x0041669c <+28>:    mov    0x10(%esp),%ecx
    0x004166a0 <+32>:    mov    $0x10624dd3,%eax
    0x004166a5 <+37>:    mul    %ecx
    0x004166a7 <+39>:    shr    $0x6,%edx
    0x004166aa <+42>:    mov    %edx,%ecx
    0x004166ac <+44>:    cmp    $0x0,%edx
    0x004166af <+47>:    jne    0x4166b6 <runtime.usleep+54>
    0x004166b1 <+49>:    mov    $0x1,%ecx
    0x004166b6 <+54>:    mov    0x58a0c4,%eax
    0x004166bc <+60>:    mov    %eax,(%esp)
    0x004166bf <+63>:    mov    $0x1,%eax
    0x004166c4 <+68>:    mov    %eax,0x4(%esp)
    0x004166c8 <+72>:    mov    %ecx,0x8(%esp)
    0x004166cc <+76>:    call   0x416ad0 <runtime.stdcall>
    0x004166d1 <+81>:    add    $0xc,%esp
    0x004166d4 <+84>:    ret
End of assembler dump.
(gdb) info r
eax            0x1      1
ecx            0x0      0
edx            0x0      0
ebx            0x0      0
esp            0x3182fecc       0x3182fecc
ebp            0x3182ff30       0x3182ff30
esi            0xa      10
edi            0x0      0
eip            0x416687 0x416687 <runtime.usleep+7>
eflags         0x10246  [ PF ZF IF RF ]
cs             0x1b     27
ss             0x23     35
ds             0x23     35
es             0x23     35
fs             0x3b     59
gs             0x0      0
(gdb) bt
#0  0x00416687 in runtime.usleep (us=void)
     at C:/go/root/src/pkg/runtime/thread_windows.c:146
#1  0x004121bd in lockextra (nilokay=void)
     at C:/go/root/src/pkg/runtime/proc.c:1044
#2  0x00411fbc in runtime.needm (x=void)
     at C:/go/root/src/pkg/runtime/proc.c:915
#3  0x0041c70c in runtime.cgocallback (fn=void, frame=void,
framesize=void)
     at C:/go/root/src/pkg/runtime/asm_386.s:495
#4  0x0042c780 in _cgoexp_e9125f37873d_Add (a=void, n=void)
     at
C:/DOCUME~1/brainman/LOCALS~1/Temp/go-build908326399/_/C_/go/root/misc/cgo/test/_test/_cgo_defun.c:321
#5  0x00480836 in ?? ()
#6  0x0042ccdb in ?? ()
#7  0x0042d65c in ?? ()
#8  0x77c3a3b0 in msvcrt!_endthreadex () from
C:\WINDOWS\system32\msvcrt.dll
#9  0x7c80b729 in KERNEL32!GetModuleFileNameA ()
    from C:\WINDOWS\system32\kernel32.dll
#10 0x00000000 in ?? ()
(gdb)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions