This is a guide with some hints on how to report Rad Studio C++ Compiler and Linker issues to Embarcadero's Quality Portal. If you follow these advices, R&D team will have more chances to reproduce and fix the issue you've found. Besides, you'll find some workarounds for common problems.
How to report a C++ Compiler problem
Enable "Diagnostic" Verbosity
- Go to Tools | Options | Environment Options | Compiling
- Change the "Verbosity" drop down to "Diagnostic":
- Do a build of the project
- Save the messages from the "Output" tab of the Messages Pane to a text file:
- Attach the text file to your bug report
Include Preprocessed files
When reporting a compiler crash, the report should contain a narrowed down testcase that illustrates the crash. If that is not possible, then include a Preprocessed copy of the source file that causes the crash. To create a 'Preprocessed' file, right click on the source file that crashes in the Project Manager and select "Preprocess". The IDE will create a .i file. Save that file and include it with the report.
You must add the compiler command line to your report, as shown in the Output tab of the Message View:
Command Line: Build vs Output Tab
It is easier to copy the Command Line from the "Build" tab but it's preferable to copy the Command Line included with your report from from the"Output" tab because the "Build" tab wraps long command lines.
How to report a Linker problem
With the case of the linker crashes, R&D team usually needs the whole linkset to reproduce the issue. IMPORTANT: We do not need source: just objs and libraries, so if you can't provide us the source code is generally fine for linker issues.
Get Linker Team to Lookup XXX#### Code
If it's a "Fatal: Error detected (XXX####)", the linker team can look up the error (the 3 letter represent a linker source file and the numbers the line number) and maybe provide some guidelines about what might be happening. In some cases these point to the compiler having generated a bad object file.
Posible workarounds for Linker problems
Turn Off Incremental Linking
Turn off Incremental linking; Clean the Project and Rebuild. This can help with ilink32 but does not help with ilink64 as "-Gn" is hardcoded in the IDE for WIN64.
Bump Heap Sizes (For 'Out of memory')
For ilink64, if the error is "Fatal: Out of memory", the -GH switch can help. First you need to make ilink64 LARGE ADDRESS AWARE. To do that use the "editbin" utility provided with Visual Studio:
editbin.exe /LARGEADDRESSAWARE $BDS/bin/ilink64.exe
Then you use the -GH switch to increase the heap that was overflowed. For example, a typical failure might report:
Turbo Incremental Link64 6.72 Copyright (c) 1997-2015 Embarcadero Technologies,
Overrun on linker heap: dwarf_info
dwarf_info 0x06039000 0x06000000
Fatal: Out of memory
The "dwarf_info" heap overflowed. To remedy we ask the linker to allocate a bigger size via: "-GHdwarf_info=0x0E000000".
You might find that after increasing one heap, another one overflows. So the final command line might read:
-GHinfo=0x24000000 -GHdwarf_info=0x0E000000 -GHbss=0x0E000000 -GHdwarf_str=0x0A000000 -GHdwarf_line=0x06000000 -GHcode=0x0E000000
Out of Memory and Unknown Heap error
Sometimes ilink32 raises an OOM and then "Unknown Heap" error (normally that unknown heap is "tds"). This workaround may help:
In the IDE:
- Go Project | Options | C++ Linker | Advanced | Additional options
- Add "-GHtds=0x0A000000" without the quotes.
- Try to link again.