build: disable control-flow architecture protection
fix: building since last commit
This commit is contained in:
parent
9c73a070b7
commit
77c39812f8
4 changed files with 17 additions and 15 deletions
|
|
@ -489,7 +489,7 @@ template <typename ...Args> bool BotGraph::raiseLoadingError (bool isGraph, MemF
|
|||
auto result = strings.format (fmt, cr::forward <Args> (args)...);
|
||||
|
||||
// display error only for graph file
|
||||
if (isGraph || cv_debug.bool_ ()) {
|
||||
if (isGraph) {
|
||||
logger.error (result);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,8 @@ if cxx == 'clang' or cxx == 'gcc'
|
|||
if os != 'darwin' and os != 'windows' and cpu != 'aarch64'
|
||||
cxxflags += [
|
||||
'-fdata-sections',
|
||||
'-ffunction-sections'
|
||||
'-ffunction-sections',
|
||||
'-fcf-protection=none'
|
||||
]
|
||||
|
||||
ldflags += [
|
||||
|
|
@ -254,7 +255,8 @@ shared_library(
|
|||
sources,
|
||||
include_directories: includes,
|
||||
gnu_symbol_visibility: 'hidden',
|
||||
name_prefix: '')
|
||||
name_prefix: ''
|
||||
)
|
||||
|
||||
run_target('package',
|
||||
command: ['python3', meson.project_source_root() + '/package.py', '@0@.@1@'.format(bot_version, count)])
|
||||
|
|
@ -761,8 +761,6 @@ int BotControl::cmdNodeUpload () {
|
|||
|
||||
String uploadUrl = cv_graph_url_upload.str ();
|
||||
|
||||
game.print ("%s", uploadUrl);
|
||||
|
||||
// try to upload the file
|
||||
if (http.uploadFile (uploadUrl, util.buildPath (BotFile::Graph))) {
|
||||
msg ("Graph file was successfully validated and uploaded to the YaPB Graph DB (%s).", product.download);
|
||||
|
|
|
|||
|
|
@ -1683,6 +1683,8 @@ template <typename U> bool BotGraph::loadStorage (StringRef name, StorageOption
|
|||
|
||||
// graphs can be downloaded...
|
||||
bool isGraph = !!(options & StorageOption::Graph);
|
||||
bool isGraphOrDebug = isGraph || cv_debug.bool_ ();
|
||||
|
||||
MemFile file (filename); // open the file
|
||||
|
||||
data.clear ();
|
||||
|
|
@ -1705,7 +1707,7 @@ template <typename U> bool BotGraph::loadStorage (StringRef name, StorageOption
|
|||
// if graph & attempted to load multiple times, bail out, we're failed
|
||||
if (isGraph && ++m_loadAttempts > 2) {
|
||||
m_loadAttempts = 0;
|
||||
return raiseLoadingError (isGraph, file, "Unable to load %s (filename: '%s'). Download process has failed as well. No nodes has been found.", name, filename);
|
||||
return raiseLoadingError (isGraphOrDebug, file, "Unable to load %s (filename: '%s'). Download process has failed as well. No nodes has been found.", name, filename);
|
||||
}
|
||||
|
||||
// downloader for graph
|
||||
|
|
@ -1752,7 +1754,7 @@ template <typename U> bool BotGraph::loadStorage (StringRef name, StorageOption
|
|||
if (tryReload ()) {
|
||||
return true;
|
||||
}
|
||||
return raiseLoadingError (isGraph, file, "Unable to open %s file for reading (filename: '%s').", name, filename);
|
||||
return raiseLoadingError (isGraphOrDebug, file, "Unable to open %s file for reading (filename: '%s').", name, filename);
|
||||
}
|
||||
|
||||
// read the header
|
||||
|
|
@ -1764,12 +1766,12 @@ template <typename U> bool BotGraph::loadStorage (StringRef name, StorageOption
|
|||
if (tryReload ()) {
|
||||
return true;
|
||||
}
|
||||
return raiseLoadingError (isGraph, file, "Unable to read magic of %s (filename: '%s').", name, filename);
|
||||
return raiseLoadingError (isGraphOrDebug, file, "Unable to read magic of %s (filename: '%s').", name, filename);
|
||||
}
|
||||
|
||||
// check the path-numbers
|
||||
if (!isGraph && hdr.length != length ()) {
|
||||
return raiseLoadingError (isGraph, file, "Damaged %s (filename: '%s'). Mismatch number of nodes (got: '%d', need: '%d').", name, filename, hdr.length, m_paths.length ());
|
||||
return raiseLoadingError (isGraphOrDebug, file, "Damaged %s (filename: '%s'). Mismatch number of nodes (got: '%d', need: '%d').", name, filename, hdr.length, m_paths.length ());
|
||||
}
|
||||
|
||||
// check the count
|
||||
|
|
@ -1777,7 +1779,7 @@ template <typename U> bool BotGraph::loadStorage (StringRef name, StorageOption
|
|||
if (tryReload ()) {
|
||||
return true;
|
||||
}
|
||||
return raiseLoadingError (isGraph, file, "Damaged %s (filename: '%s'). Paths length is overflowed (got: '%d').", name, filename, hdr.length);
|
||||
return raiseLoadingError (isGraphOrDebug, file, "Damaged %s (filename: '%s'). Paths length is overflowed (got: '%d').", name, filename, hdr.length);
|
||||
}
|
||||
|
||||
// check the version
|
||||
|
|
@ -1785,7 +1787,7 @@ template <typename U> bool BotGraph::loadStorage (StringRef name, StorageOption
|
|||
ctrl.msg ("Graph version mismatch %s (filename: '%s'). Version number differs (got: '%d', need: '%d') Please, upgrade %s.", name, filename, hdr.version, version, product.name);
|
||||
}
|
||||
else if (hdr.version > version && !isGraph) {
|
||||
return raiseLoadingError (isGraph, file, "Damaged %s (filename: '%s'). Version number differs (got: '%d', need: '%d').", name, filename, hdr.version, version);
|
||||
return raiseLoadingError (isGraphOrDebug, file, "Damaged %s (filename: '%s'). Version number differs (got: '%d', need: '%d').", name, filename, hdr.version, version);
|
||||
}
|
||||
|
||||
// temporary solution to kill version 1 vistables, which has a bugs
|
||||
|
|
@ -1795,7 +1797,7 @@ template <typename U> bool BotGraph::loadStorage (StringRef name, StorageOption
|
|||
if (File::exists (vistablePath)) {
|
||||
plat.removeFile (vistablePath.chars ());
|
||||
}
|
||||
return raiseLoadingError (isGraph, file, "Bugged vistable %s (filename: '%s'). Version 1 has a bugs, vistable will be recreated.", name, filename);
|
||||
return raiseLoadingError (isGraphOrDebug, file, "Bugged vistable %s (filename: '%s'). Version 1 has a bugs, vistable will be recreated.", name, filename);
|
||||
}
|
||||
|
||||
// save graph version
|
||||
|
|
@ -1805,7 +1807,7 @@ template <typename U> bool BotGraph::loadStorage (StringRef name, StorageOption
|
|||
|
||||
// check the storage type
|
||||
if ((hdr.options & options) != options) {
|
||||
return raiseLoadingError (isGraph, file, "Incorrect storage format for %s (filename: '%s').", name, filename);
|
||||
return raiseLoadingError (isGraphOrDebug, file, "Incorrect storage format for %s (filename: '%s').", name, filename);
|
||||
}
|
||||
auto compressedSize = static_cast <size_t> (hdr.compressed);
|
||||
auto numberNodes = static_cast <size_t> (hdr.length);
|
||||
|
|
@ -1822,7 +1824,7 @@ template <typename U> bool BotGraph::loadStorage (StringRef name, StorageOption
|
|||
|
||||
// try to uncompress
|
||||
if (ulz.uncompress (compressed.data (), hdr.compressed, reinterpret_cast <uint8_t *> (data.data ()), hdr.uncompressed) == ULZ::UncompressFailure) {
|
||||
return raiseLoadingError (isGraph, file, "Unable to decompress ULZ data for %s (filename: '%s').", name, filename);
|
||||
return raiseLoadingError (isGraphOrDebug, file, "Unable to decompress ULZ data for %s (filename: '%s').", name, filename);
|
||||
}
|
||||
else {
|
||||
|
||||
|
|
@ -1857,7 +1859,7 @@ template <typename U> bool BotGraph::loadStorage (StringRef name, StorageOption
|
|||
}
|
||||
}
|
||||
else {
|
||||
return raiseLoadingError (isGraph, file, "Unable to read ULZ data for %s (filename: '%s').", name, filename);
|
||||
return raiseLoadingError (isGraphOrDebug, file, "Unable to read ULZ data for %s (filename: '%s').", name, filename);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue