linker crash (ld returned 5 exit status)
Posted: Mon Apr 04, 2022 6:13 am
ESP-IDF : v4.4 (commit 8153bfe4125e6a608abccf1561fd10285016c90a)
Target : esp32s3
Build OS : Windows 10 pro 64bit
In my build, ld exit with error and start Werfault.exe(Windows Error Reporting).
Error message is only "collect2.exe: error: ld returned 5 exit status".
The following is the analyzation of the crash dump which Werfault.exe dumped.
How to fix this issue?
Thank you.
Target : esp32s3
Build OS : Windows 10 pro 64bit
In my build, ld exit with error and start Werfault.exe(Windows Error Reporting).
Error message is only "collect2.exe: error: ld returned 5 exit status".
The following is the analyzation of the crash dump which Werfault.exe dumped.
How to fix this issue?
Thank you.
- Microsoft (R) Windows Debugger Version 10.0.22549.1000 AMD64
- Copyright (c) Microsoft Corporation. All rights reserved.
- Loading Dump File [C:\CrashDumps\ld.exe.33680.dmp]
- User Mini Dump File with Full Memory: Only application data is available
- Symbol search path is: srv*
- Executable search path is:
- Windows 10 Version 19043 MP (4 procs) Free x64
- Product: WinNt, suite: SingleUserTS
- Edition build lab: 19041.1.amd64fre.vb_release.191206-1406
- Machine Name:
- Debug session time: Mon Apr 4 14:20:25.000 2022 (UTC + 9:00)
- System Uptime: 6 days 6:23:35.554
- Process Uptime: 0 days 0:00:08.000
- ............
- This dump file has an exception of interest stored in it.
- The stored exception information can be accessed via .ecxr.
- (8390.7dc0): Access violation - code c0000005 (first/second chance not available)
- For analysis of this file, run !analyze -v
- ntdll!NtWaitForMultipleObjects+0x14:
- 00007ffc`9186d8c4 c3 ret
- 0:000> !analyze -v
- *******************************************************************************
- * *
- * Exception Analysis *
- * *
- *******************************************************************************
- KEY_VALUES_STRING: 1
- Key : AV.Dereference
- Value: NullClassPtr
- Key : AV.Fault
- Value: Read
- Key : Analysis.CPU.mSec
- Value: 1093
- Key : Analysis.DebugAnalysisManager
- Value: Create
- Key : Analysis.Elapsed.mSec
- Value: 6661
- Key : Analysis.Init.CPU.mSec
- Value: 1124
- Key : Analysis.Init.Elapsed.mSec
- Value: 33792
- Key : Analysis.Memory.CommitPeak.Mb
- Value: 78
- Key : Timeline.OS.Boot.DeltaSec
- Value: 541415
- Key : Timeline.Process.Start.DeltaSec
- Value: 8
- Key : WER.OS.Branch
- Value: vb_release
- Key : WER.OS.Timestamp
- Value: 2019-12-06T14:06:00Z
- Key : WER.OS.Version
- Value: 10.0.19041.1
- FILE_IN_CAB: ld.exe.33680.dmp
- NTGLOBALFLAG: 0
- APPLICATION_VERIFIER_FLAGS: 0
- CONTEXT: (.ecxr)
- rax=0000000000000000 rbx=0000000000000000 rcx=0000000000cc0000
- rdx=0000000000000000 rsi=0000000000000001 rdi=0000000000000069
- rip=0000000000443e64 rsp=000000000119f750 rbp=0000000005f407d8
- r8=0000000000000008 r9=0000000000000000 r10=7f65736d68716f75
- r11=8101010101010100 r12=0000000000000001 r13=0000000000565a08
- r14=0000000000597b60 r15=000000000b737518
- iopl=0 nv up ei pl nz na pe nc
- cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202
- ld+0x43e64:
- 00000000`00443e64 0fb64318 movzx eax,byte ptr [rbx+18h] ds:00000000`00000018=??
- Resetting default scope
- EXCEPTION_RECORD: (.exr -1)
- ExceptionAddress: 0000000000443e64 (ld+0x0000000000043e64)
- ExceptionCode: c0000005 (Access violation)
- ExceptionFlags: 00000000
- NumberParameters: 2
- Parameter[0]: 0000000000000000
- Parameter[1]: 0000000000000018
- Attempt to read from address 0000000000000018
- PROCESS_NAME: ld.exe
- READ_ADDRESS: 0000000000000018
- ERROR_CODE: (NTSTATUS) 0xc0000005 - 0x%p 0x%p Q B %s B
- EXCEPTION_CODE_STR: c0000005
- EXCEPTION_PARAMETER1: 0000000000000000
- EXCEPTION_PARAMETER2: 0000000000000018
- STACK_TEXT:
- 00000000`0119f750 00000000`00472fa2 : 00000000`011a4ae0 00000000`00000004 00000000`05e5b7b0 00000000`00000017 : ld+0x43e64
- 00000000`0119f8f0 00000000`004747e7 : 00000000`011a4ae0 00000000`00597b60 00000000`0c128130 00000000`004b793c : ld+0x72fa2
- 00000000`0119fa80 00000000`00418246 : 00000000`011a4ae0 00000000`00597b60 00000000`05330fe5 00000000`00000040 : ld+0x747e7
- 00000000`0119fcb0 00000000`004cceaf : 00007ffc`906dfc10 00000000`03972e76 00000000`0051f990 00000000`00592350 : ld+0x18246
- 00000000`0119fd90 00000000`004013f8 : 00000000`00000241 00000000`011af490 00000000`00598208 00000000`00000000 : ld+0xcceaf
- 00000000`0119fe30 00000000`0040151b : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ld+0x13f8
- 00000000`0119ff00 00007ffc`90797034 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ld+0x151b
- 00000000`0119ff30 00007ffc`91822651 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x14
- 00000000`0119ff60 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x21
- STACK_COMMAND: ~0s; .ecxr ; kb
- SYMBOL_NAME: ld+43e64
- MODULE_NAME: ld
- IMAGE_NAME: ld.exe
- FAILURE_BUCKET_ID: NULL_CLASS_PTR_READ_c0000005_ld.exe!Unknown
- OS_VERSION: 10.0.19041.1
- BUILDLAB_STR: vb_release
- OSPLATFORM_TYPE: x64
- OSNAME: Windows 10
- FAILURE_ID_HASH: {47bf2114-b1f0-50b5-d93d-41b4b9a09ef8}
- Followup: MachineOwner
- ---------