Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes this external bug.
Finally, I found the root cause of the crash.
This crash happens because extern "C" function
select_result
throws exception but we use/EHsc
flag, which leads to UB. Because of UB the compiler can create a code that calls a destructor of already destroyed or never created object while doing stack unwinding.Also this pull request fixes freeing of
FCallbackSet
inFreeBackend
function.UPDATE:
@michaellukashov, I updated this pull request with another one that was previously created separately, because otherwise merging them would result in a error.
So, I describe that appended PR: "Include map file in releases and fix optimizations"
There are several issues with release builds:
NetBox
crashes andFar
is able to create a crash report, that report won't contain meaningful names ofNetBox
functions and a random user may create an issue attaching such a problematic report. So, it's a good idea to include rather small.map
file in the binary distribution, becauseFar
can use them to convert addresses to meaningful names. (Far
releases include.map
files for all executables.)This PR adds
NetBox.map
file to the release build.It also fixes and simplifies compiler and linker flags among different build types:
Far
- they are already loaded in the process address space./GS-
flag as security measureDEBUG
define forRelWithDebInfo
Release
compile for the maximum speed,RelWithDebInfo
- the same asRelease
but with.pdb
and.map
files, andMinSizeRel
- the same asRelease
but compiled for the smallest size