Commit Graph

262 Commits

Author SHA1 Message Date
henrik karlsson
5b96352978 Fixes for c++ headerunits/modules.
* Adding forward declarations
* Adding "inline" in front of const/constexpr variables in headers
* Adding includes
* A few moves of ctor/dtor to cpp file

#preflight 6372b3ac0c74adb48b49f313
#rb none

[CL 23130896 by henrik karlsson in ue5-main branch]
2022-11-14 19:59:41 -05:00
brandon schaefer
68c446a297 Add support for an Allow Syscall filter file to be passed into the Engine (supports x64 and arm64)
This will cause any syscall *not* in the allow list to cause SIGSYS and then we will exit from our signal handler (unless our signal handler uses a syscall that is not supported in which case we will crash, though a core dump will need to be checked)

Requires explicitly calling this function where you want to actually *setup* the filters:
FPlatformMisc::SetupSyscallFilters();

To use:
-allowsyscallfilterfile=<path/to/allow_filter_file.txt>

Example of file:
read
write
open
mprotect 2 4 0 1

There are only two supported rules for the file:
<syscall_name>
<syscall_name> <syscall_arg_number_zero_based_index> <value> <allow> <check bit only>

#jira UE-169652
#rb Josh.Adams, Robert.Seiver, Calvin.Zheng
#preflight 636d44e81c14fe450503f5cf

[CL 23091532 by brandon schaefer in ue5-main branch]
2022-11-10 20:45:09 -05:00
danny couture
558bd8484a Add support for -corelimit on unix
#rnx
#rb Brandon.Schaefer
#preflight 63594fa5765b435ddd2de780

[CL 22781581 by danny couture in ue5-main branch]
2022-10-26 11:44:07 -04:00
sarah noonan
1a993b9ada *Remove per-frame caching of stats from FPlaformMemory::GetStats and move caching into helper function.
*Update common callers of FPlaformMemory::GetStats to use the helper.
[REVIEW] [at]matt.peters

[CL 22596606 by sarah noonan in ue5-main branch]
2022-10-18 07:22:43 -04:00
evgenii babinets
528585a552 Merging with resolved conflicts on behalf of sarah.noonan. Original CL description:
*Make FPlatformMemory::GetStats cache memory stats per frame to prevent multiple costly platform calls per frame ( by default, has option to request non-cached values ).
*Update some calls to FPlatformMemory::GetStats to specifically request non-cached values.
[REVIEW] [at]evgenii.babinets [at]andrew.ladenberger


#preflight 634a04c0907f4749392d75d0

[CL 22545788 by evgenii babinets in ue5-main branch]
2022-10-14 21:13:08 -04:00
robert seiver
b4db2e582f Temporary workaround for creating processes that use two unique pipes
#fyi Brandon.Schaefer, James.Singer, Ryan.Neyland
#preflight 633ef28fb7327403d9a2c42b

[CL 22459137 by robert seiver in ue5-main branch]
2022-10-11 11:51:54 -04:00
anton dunchev
09c0b7c71d Prevent log spam in FUnixPlatformProcess::SetThreadNiceValue.
#rb brandon.schaefer
#tests - Compile and run

[CL 22143016 by anton dunchev in ue5-main branch]
2022-09-22 15:31:34 -04:00
dmytro vovk
a02c1fc739 Fixed IMappedFileHandle::MapRegion to map files\regions smaller than a page size
#jira none
#rb Brandon.Schaefer
#preflight 6320c80447741a7dbd233398

[CL 22092571 by dmytro vovk in ue5-main branch]
2022-09-20 10:34:38 -04:00
anton dunchev
e825604e90 Process control:
- Implemented priority control on Unix platform
- Refactored RunnableThreadUnix implementation
- Bump resource limits for process scheduling priority (nice) if possible

#rb LouisPhilippe.Seguin, Brandon.Schaefer
[FYI] anrew.ladenberger

[CL 22087348 by anton dunchev in ue5-main branch]
2022-09-19 22:28:24 -04:00
Brandon Schaefer
8c481a0e46 Fix using FPaths::DirectoryExists in crash handling code as it depends on a global which may be dead at time of crash/assert
Also move to less allocations, and a static buffer. We still use TCHAR_TO_UTF8 allocations but will look at fixing up later

#jira UE-163043
#rb James.Singer, Zack.Neyland
#fyi Chris.Constantinescu
#preflight 631a0ee8d31788ea3a46f4cc

[CL 21898347 by Brandon Schaefer in ue5-main branch]
2022-09-08 14:11:11 -04:00
Brandon Schaefer
34535ff008 Disable the altstack for the thread before freeing it. If not can leave the kernel with a dangling pointer to a memory region that is no longer valid
Also add protection pages to the left and right of our altstack to catch buffer over/under flows

#jira none
#rb Robert.Seiver, James.Singer
#preflight none

[CL 21747800 by Brandon Schaefer in ue5-main branch]
2022-09-01 16:58:23 -04:00
rex hill
593988be39 Deprecate GIsFirstInstance for FPlatformProcess::IsFirstInstance() and make it work in shipping editor
#rb josh.adams
#preflight 62f3ccd1bc175ec68c439d8e

#ROBOMERGE-AUTHOR: rex.hill
#ROBOMERGE-SOURCE: CL 21319766 via CL 21323340 via CL 21323407 via CL 21323452
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21325866 by rex hill in ue5-main branch]
2022-08-10 17:01:37 -04:00
rex hill
0f01e554a4 [Backout] - CL21299688
[FYI] Rex.Hill
Original CL Desc
-----------------------------------------------------------------
Allow GIsFirstInstance in shipping editor
#preflight 62f2bc6523003b62a3039e8d
#rb josh.adams

#ROBOMERGE-AUTHOR: rex.hill
#ROBOMERGE-SOURCE: CL 21310168 via CL 21312295 via CL 21312341 via CL 21312351
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21314406 by rex hill in ue5-main branch]
2022-08-10 02:17:06 -04:00
rex hill
7ec0f0d3fb Allow GIsFirstInstance in shipping editor
#preflight 62f2bc6523003b62a3039e8d
#rb josh.adams

#ROBOMERGE-AUTHOR: rex.hill
#ROBOMERGE-SOURCE: CL 21299688 via CL 21304677 via CL 21304703 via CL 21304719
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21308838 by rex hill in ue5-main branch]
2022-08-09 22:04:01 -04:00
bryan sefcik
b1e7f6fc29 Fixed compile issues found by compiling editor with -NoPCH -DisableUnity.
#jira

#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21121764 via CL 21121765 via CL 21121766
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21143035 by bryan sefcik in ue5-main branch]
2022-07-17 23:54:03 -04:00
Devin Doucette
2961cd5dca Logging: Restored and deprecated a deleted function and tweaked the affected names
#preflight 62c84b80b3789302b1ebd675
#rb Zousar.Shaker
#rnx
#fyi Jack.Porter

[CL 21009006 by Devin Doucette in ue5-main branch]
2022-07-08 12:23:44 -04:00
Jack Porter
e5cba9bf11 Replace uses of master in OutputDeviceRedirector
#jira UE-158659
#rb Florin.Pascu
#preflight 62c7e8666003a9b045822d62

[CL 21004289 by Jack Porter in ue5-main branch]
2022-07-08 04:33:35 -04:00
bryan sefcik
a9cc65bca4 Updated Core code to not use CoreMinimal.h when possible.
Core public headers still will contain CoreMinimal.h if any included it before my IWYU changes.
#preflight 62c73594756222ced4e48707

[CL 20991367 by bryan sefcik in ue5-main branch]
2022-07-07 16:02:19 -04:00
bryan sefcik
9905eb52bb Pass 2 on running IWYU on Core.
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.
#preflight 62c703bbd13fac04f11da948

[CL 20985655 by bryan sefcik in ue5-main branch]
2022-07-07 12:30:11 -04:00
Wojciech Krywult
208cd6c891 Modular builds: Memory: Tweaked the system initialization to make it work with modular builds on some platforms.
On some consoles we load dynamic modules very early during the process initialization and rely on the allocators being ready. It happens even before we have the opportunity to call FPlatformMemory::Init() explicitly, so need to have it called on-demand from FMemory_GCreateMalloc_ThreadUnsafe.

Updated FXXXPlatformMemory::Init on all supported platforms to handle multiple Init() calls gracefully. We do this to free our common code from having to explicitly check if the system has been initialized.

#rb jeff.newquist
#preflight 62a9ebf8634e82e5d1e849de
#rnx

[CL 20983808 by Wojciech Krywult in ue5-main branch]
2022-07-07 10:28:55 -04:00
bryan sefcik
62489fe2b3 Ran a pass of IWYU on Core.
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.

#rb Devin Doucette and Marc Audy
#preflight 62c62086756222ced497ff95
#preflight 62c626d12f2d04691814d331
#preflight 62c630107e606620fdd64e31
#preflight 62c635c6756222ced49a13cf

[CL 20979027 by bryan sefcik in ue5-main branch]
2022-07-06 21:44:18 -04:00
Mike Beach
d12c9bafe6 Fix IterateDirectory() on various platforms so it's behavior is consistent (was not breaking iteration when desired, meaning the function's return value could be wrong as well).
#rb brandon.schaefer, matt.johnson
#preflight 62bf4366ed35ee71a775a6ea

[CL 20919152 by Mike Beach in ue5-main branch]
2022-07-01 15:11:17 -04:00
Brandon Schaefer
647b8ac856 Fix CIS warning for implicit conversion
#jira UE-158220
#rb none
#fyi none
#preflight none

[CL 20914210 by Brandon Schaefer in ue5-main branch]
2022-07-01 10:33:59 -04:00
Brandon Schaefer
b59f1897e6 Fix implicit type conversion warnings for Linux
Some just kept the same (ie. lose of data/precision) while did try to fix some

#rb Joe.Kirchoff
#preflight 62bb5a4f3771c5710dc4c013
#jira none

[CL 20863786 by Brandon Schaefer in ue5-main branch]
2022-06-28 16:08:14 -04:00
steve robb
28609e6f3c Removal of TEXT used in static_asserts (redundant in ANSI/wide modes, broken in UTF-8 mode).
#rb james.hopkin
#jira UE-132142
#preflight 62a87ef40b7bda795a7dfff0

#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 20647361 via CL 20647632 via CL 20647654
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20650895 by steve robb in ue5-main branch]
2022-06-14 12:11:45 -04:00