Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
* Add -msse2 compile option
Cherry-pick of https://github.com/dotnet/runtime/pull/33135
* Use prefixed hex format in asm
Cherry-pick of https://github.com/dotnet/runtime/pull/33205
* [Tizen] Add CoreCLR tests build dependencies v3.1.3 for x86
* [Tizen] Add CoreCLR tests build dependencies v3.1.3 for x64
* [Tizen] Allow build of tests for x86/x64
|
|
- After relocation, relocation section in zap image is not necessary.
- Mark the section as NotNeeded by giving advice(madvise with MADV_DONTNEED)
- It reduces 120~150KB PSS in tizen sample apps.
|
|
|
|
Parse ".dynamic" section (ELF dynamic array tags) of the module being
added, find ".rel(a).plt" section and search it for presence of
'__asan_init' symbol.
Change-Id: Ie7cc4c818b791b5f00713b42ba15131325b8152c
Signed-off-by: Andrey Drobyshev <a.drobyshev@samsung.com>
|
|
* Comment rewordings required by policheck.
* Use AppContainer instead of Windows Store.
|
|
Right now the new format is not on by default, but it can be enabled using COMPlus_EventPipeNetTraceFormat = 1 for testing purposes. The plan to have a follow up PR that will add shipping configuration mechanisms and change the default setting.
See the documentation in the PerfView repo for more details about the format. At a glance the goal is to create a format that is more efficient to produce, has a smaller on disk size, and offers enhanced functionality in a few areas:
a) 64 bit thread id support
b) Detection of dropped events via sequence numbers
c) Better support for extracting subsets of the file
Together with the change there was also some refactoring of the EventPipeBufferManager and EventPipeThread.
This change addresses (at least in part) the following issues:
#19688, #23414, #24188, #20751, #20555, #21827, #24852, #25046
|
|
* fix compilation with gcc7.x
In file included from src/inc/sstring.h:1029:0,
from src/inc/ex.h:19,
from src/inc/stgpool.h:28,
from src/inc/../md/inc/metamodel.h:18,
from src/inc/../md/inc/metamodelro.h:19,
from src/inc/metadata.h:17,
from src/inc/corpriv.h:21,
from src/md/compiler/stdafx.h:20,
from src/md/compiler/mdutil.cpp:12:
src/inc/sstring.inl: In member function ‘const WCHAR* SString::GetUnicode() const’:
src/inc/sstring.inl:650:5: error: nonnull argument ‘this’ compared to NULL [-Werror=nonnull-compare]
if (this == NULL)
^~
add version check
* Use the abstracted version of __nodebug__
* cc1: warning: command line option ‘-fpermissive’ is valid for C++/ObjC++ but not for C
|
|
test case run at (#24844)
least 4 to 5 times faster than before.
Fallback to old transport ReadMemory if /proc/<pid>/mem can't be opened. This happens
on attach because of permissions/access, but works fine on the launch (the most
important case).
|
|
Fixes #21009
|
|
* Basic infra for cuckoo filter of attributes
- Implement cuckoo filter lookup logic
- Implement new ready to run section
- Add dumper to R2RDump
- Parse section on load into data structure
- Implement function to query filter
- Add concept of enum of well known attributes
- So that attribute name hashes themselves may be cached
* Wrap all even vaguely perf critical uses of attribute by name parsing with use of R2R data
* Update emmintrin.h in the PAL header to contain the needed SSE2 intrinsics for the feature
- Disable the presence table for non Corelib cases. Current performance data does not warrant the size increase in other generated binaries
|
|
Fix CPUSET_T definition for FreeBSD
|
|
unicodedata.cpp based on UnicodeData.txt v11.0.
|
|
|
|
|
|
Add the DiagnosticProtocolHelper class to deserialize and dispatch
the new GenerateCoreDump command.
Refactor the PAL createdump launch on unhandled exception code to
used by a new PAL_GenerateCoreDump method that doesn't depend on
the complus dump environment variables.
Changed the "full" createdump not to include the uncommitted pages and
removed the "add module metadata" workaround for SOS clrstack !UNKNOWN
problem now that is fixed in SOS (crashinfo.cpp).
|
|
- Add crossgen test to verify file version is preserved
- Add support for general win32 resource copying to ReadyToRun
- Copy all resources
|
|
* Fix build on OSX and Linux machines without NUMA installed - there were
couple of places where I was missing ifdefs
* Fix bug in nodeMaskLength computation
* Remove testing change in eeconfig.cpp that has leaked into the PR
* Fix GCToOSInterface::GetTotalProcessorCount for embedded GC to return
all processors on the system, not just the ones enabled for the current
process.
|
|
This change removes CPU groups emulation from Unix PAL and modifies the
GC and thread pool code accordingly.
|
|
|
|
Affected files: assert.h, emmintrin.h, and xmmintrin.h
Bug: 20784
|
|
Enable SSE for GCC
|
|
|
|
(#23106)
This is the first commit to enable a "diagnostic port" using IPC (Named Pipe on Windows and Unix Domain Socket on other platforms). This change currently enable EventPipe to be enabled/disabled without the use of a file drop.
- Split the DiagnosticsIpc into (DiagnosticsIpc/IpcStream)
- DiagnosticsIpc (IPC listener) is meant to be used by the Diagnostic server.
- IpcStream (IPC channel) is meant to be use to communicate with the connected client.
- Change the FastSerializer dependency from `CFileStream` to `StreamWriter`
This abstraction is meant decouple the writing of objects in order to extend its usability.
The main objective is to reuse FastSerializer to stream data through the open IPC channel.
- Moved the EventPipeSessionProvider* classes to their own file.
- Added a more streamlined parsing achievable by defining a simpler binary protocol (by noahfalk).
1. Only one allocation is needed for the EventPipeProviderConfiguration array, no allocations or copies are needed for strings because we can refer to them directly out of the incoming command buffer
2. No change to the EventPipe API for enable is required. EventPipeProviderConfiguration retains its current behavior of not deleting the string pointers it holds.
3. No leaks happen because the command buffer owns the string memory and ensures that it stays alive for the duration of the Enable() call.
|
|
There were about 800 false positive issues in the clang status analyzer
build caused by the fact that various forms of asserts were not considered
by the analyzer as not returning.
This change adds __attribute__((analyzer_noreturn)) (wrapped in a macro) to
those assertion functions.
|
|
* Use thread_local for thread local storage on non MSVC targets
* Use local copy of visitor rather than function parameter
* Remove extra class qualifier
* Replace hex number representation in ASM files
* Reorder STDAPI and DLLEXPORT
* Suppress conversion
Suppress warning during hash
add casting
* Remove anonymous struct
src/vm/codeversion.h:112:16: warning: ‘struct NativeCodeVersion::<anonymous union>::SyntheticStorage’ invalid; an anonymous union can only have non-static data members [-fpermissive]
struct SyntheticStorage
* Remove class declaration
Remove extra class declaration
* Remove extern C
* Add implicit paranthesis
src/vm/amd64/virtualcallstubcpu.hpp:735:103: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses]
resolveInit.toMiss1 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss1)+1) & 0xFF;
^
src/vm/amd64/virtualcallstubcpu.hpp:741:103: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses]
resolveInit.toMiss2 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss2)+1) & 0xFF;
Add parenthesis
src/vm/dataimage.cpp:631:55: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
previousRvaInfo->rva == rvaInfo->rva && previousRvaInfo->size >= rvaInfo->size
Add parenthesis
src/debug/daccess/daccess.cpp:6871:29: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
_ASSERTE(peFile == NULL && reflectionModule != NULL || peFile != NULL && reflectionModule == NULL);
Add parenthesis
src/vm/dataimage.cpp:631:57: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
(previousRvaInfo->rva == rvaInfo->rva) && (previousRvaInfo->size >= rvaInfo->size)
* Initialize member 1
src/ilasm/method.cpp:35:36: warning: operation on ‘((Method*)this)->Method::m_ulColumns[0]’ may be undefined [-Wsequence-point]
m_ulColumns[0]=m_ulColumns[0]=0;
* Remove unknown compiler option
* Abstract DLLEXPORT
|
|
(#22662)
* Abstract selectany
* Fix initializer element is not constant
src/corefx/System.Globalization.Native/pal_icushim.c:58:34: error: initializer element is not constant
static const int MaxICUVersion = MinICUVersion + 20;
* Enable ms extensions
* Apply LLVM patterns to GCC
* Remove deprecated function
* Fix const conversion error
src/corefx/System.Globalization.Native/pal_calendarData.c:390:16: warning: passing argument 1 of ‘ures_close_ptr’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ures_close(erasResBundle);
src/corefx/System.Globalization.Native/pal_calendarData.c:419:22: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
char* name = GetCalendarName(calendarId);
* Remove old compiler option
|
|
* Fix large integer truncation
pal/pal.h:4988:43:
warning: large integer implicitly truncated to unsigned type
[-Woverflow]
static const SIZE_T NoTargetFrameSp = SIZE_MAX;
^~~~~~~~
* Fix compilation error with GCC
/usr/include/c++/7.3.0/debug/functions.h:452:15: error: expected unqualified-id before ')' token
__deref();
^
/usr/include/c++/7.3.0/debug/functions.h:455:34: error: expected primary-expression before '<' token
typename = decltype(__deref<_It>() < __deref<_It>())>
^
/usr/include/c++/7.3.0/debug/functions.h:455:38: error: expected primary-expression before '>' token
typename = decltype(__deref<_It>() < __deref<_It>())>
^
/usr/include/c++/7.3.0/debug/functions.h:455:40: error: expected primary-expression before ')' token
typename = decltype(__deref<_It>() < __deref<_It>())>
^
|
|
|
|
* Fix visibility and signed comparison issues for GCC
* Fix hidden _CLRDataCreateInstance warned by macOS
* Fix indentation in vswprintf/test1
* Change void* to PVOID in implementation files
|
|
* Reorder extern "C" and visibility statements
In file included from coreclr/src/pal/inc/pal.h:70:0,
coreclr/src/pal/inc/pal_mstypes.h:30:25: error: expected unqualified-id
before string constant
#define EXTERN_C extern "C"
^
coreclr/src/pal/inc/rt/palrt.h:216:30: note:
in expansion of macro 'EXTERN_C'
#define STDAPI_(type) EXTERN_C type STDAPICALLTYPE
* Need double quotes around single quotes in error statements
fix error statements
Can't have ' character in error statement
* Abstract __declspec(noinline)
Generate compiler independent macros for noinline request.
* Remove unused DBG_NOINLINE_X86__RET_INLINE
* Abstract __declspec(nothrow)
|
|
|
|
|
|
* Declare throw only when compiling for c++
Prevent the definition from getting defined multiple times and
map it to throw() only when compiling c++ code.
* Suppress warnings for tests
Suppress:
-Wno-write-strings
-Wno-sign-compare
-Wno-narrowing
-fpermissive
-Wno-int-to-pointer-cast
to allow tests to compile
* Add gcc option to build.sh script
Following clangx.y model add -gccx.y command line
arguments with gcc5 and gcc7 being the currnetly supported
options.
* Allow environment variable to be used for TOOLCHAIN
Remove CLANG specific compiler options as well.
* Hide non-GNU compiler options
* Do not include local directory if cross compiling
[ 0%] Building CXX object src/pal/src/eventprovider/tracepointprovider/CMakeFiles/coreclrtraceptprovider.dir/__/lttng/traceptprovdotnetruntime.cpp.o
cc1plus: error: include location "/usr/local/include" is unsafe for cross-compilation [-Werror=poison-system-directories]
* Suppress unknown pragma warnings
src/pal/src/exception/seh-unwind.cpp:37:0:
warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
#pragma clang diagnostic pop
Removing these cause compilation error on clang7 and arm as follows:
In file included from /bin/obj/Linux.arm.Debug/src/pal/src/libunwind/include/libunwind.h:9:
/src/pal/src/libunwind/include/libunwind-arm.h:247:9: error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wextern-c-compat]
typedef struct unw_tdep_save_loc
^
/src/pal/src/libunwind/include/libunwind-arm.h:288:9: error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wextern-c-compat]
typedef struct
* plt not useful for GNU and ARM64/ARM
src/pal/src/arch/arm64/callsignalhandlerwrapper.S: Assembler messages:
src/pal/src/arch/arm64/callsignalhandlerwrapper.S:31: Error: unexpected characters following instruction at operand 1 -- `bl signal_handler_worker@plt'
src/pal/src/arch/arm64/callsignalhandlerwrapper.S:32: Error: unexpected characters following instruction at operand 1 -- `bl signal_handler_worker@plt'
* Remove double const from argv in PAL_Initialize
Seeing compilation error with GNU for C source files as follows:
if (PAL_Initialize(argc, argv) != 0)
^
src/pal/tests/palsuite/common/palsuite.h:21:0,
from src/pal/tests/palsuite/c_runtime/asinhf/test1/test1.c:18:
src/pal/inc/pal.h:374:1: note: expected ‘const char * const*’ but argument is of type ‘char **’
* Suppress format warnings using GNU for libunwind
warning: format ‘%li’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=]
Debug (4, " aligned frame, offset %li\n", f->cfa_reg_offset);
* Fix -fpermissive warnings for GNU
* Suppress unused variable warning in libunwind
src/pal/src/libunwind/include/libunwind-aarch64.h:201:5: warning: right-hand operand of comma expression has no effect [-Wunused-value]
#define unw_tdep_getcontext(uc) (({ \
~~~~~~~~~
unw_tdep_context_t *unw_ctx = (uc); \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
register uint64_t *unw_base asm ("x0") = (uint64_t*) unw_ctx->uc_mcontext.regs; \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__asm__ __volatile__ ( \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x0, x1, [%[base], #0]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x2, x3, [%[base], #16]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x4, x5, [%[base], #32]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x6, x7, [%[base], #48]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x8, x9, [%[base], #64]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x10, x11, [%[base], #80]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x12, x13, [%[base], #96]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x14, x13, [%[base], #112]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x16, x17, [%[base], #128]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x18, x19, [%[base], #144]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x20, x21, [%[base], #160]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x22, x23, [%[base], #176]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x24, x25, [%[base], #192]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x26, x27, [%[base], #208]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"stp x28, x29, [%[base], #224]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"str x30, [%[base], #240]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"mov x1, sp\n" \
~~~~~~~~~~~~~~~~
"stp x1, x30, [%[base], #248]\n" \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: [base] "+r" (unw_base) : : "x1", "memory"); \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}), 0)
* Fix warning: ‘memset’ used with length equal to number of elements warning
Fix similar warnings to these by including the element size into total size
calculation.
src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp: In function ‘int main(int, char**)’:
src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp:89:31: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
memset(NewValue,0,BUF_SIZE);
* Define CLR specific compiler option CLR_CMAKE_COMPILER
By the time toolchain.cmake is called, the compiler detection from
cmake is not active. We need an intermediate definition to pass
to compiler detection.
|
|
* Preserve Vector Arg registers on Arm64
Fix #14371
|
|
* Abstract away NOINLINE statement
MSVC and GNU compilers use different attributes for noinline.
Abstract away compiler differences.
* Replace __sync_swap with __atomic_exchange_n
__sync_swap doesn't exist on GNU. Replacing with __atomic_exchange_n
which is universally available.
* Define CDECL for GNUC
__cdecl is not defined by default on GNU compilers.
* Define gcc version of __declspec(thread)
* Correct pointer casting
A pointer value is usually unsigned long on most platforms.
Casting it to integer causes signedness issues. Use size_t
to be efficient on all 32 and 64 bit architectures.
* Put quotes around the error string
Correct error statement. GNU G++ is picky about the string
following the error statement with ' character in it. It needs
to be enclosed with double quotes.
* Fix casting problem
Seeing these warnings with GNU G++ compiler
src/pal/src/sync/cs.cpp: In function ‘void CorUnix::InternalInitializeCriticalSectionAndSpinCount(PCRITICAL_SECTION, DWORD, bool)’:
src/pal/src/sync/cs.cpp:630:48: warning: converting to non-pointer type ‘SIZE_T {aka long unsigned int}’ from NULL [-Wconversion-null]
pPalCriticalSection->OwningThread = NULL;
^
src/pal/src/sync/cs.cpp: In function ‘void CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*)’:
src/pal/src/sync/cs.cpp:880:43: warning: converting to non-pointer type ‘SIZE_T {aka long unsigned int}’ from NULL [-Wconversion-null]
pPalCriticalSection->OwningThread = NULL;
^
* Abstract optnone compiler attribute
GNU compiler doesn't support optnone attribute.
pal/src/exception/seh-unwind.cpp:449:77: warning: ‘optnone’ attribute directive ignored [-Wattributes]
* Set the aligned attribute for GNU compiler
* Make __rotl and __rotr functions portable
GNU compiler doesn't have an intrinsic for these. Open code them
using the provided implementation.
* Define deprecated attribute for gcc
* Add throw specifier for GCC
/usr/include/string.h:43:28: error: declaration of ‘void* memcpy(void*, const void*, size_t) throw ()’ has a different exception specifier
size_t __n) __THROW __nonnull ((1, 2));
|
|
* On SIGTERM default to a non-zero exit code
* Fix Windows builds
* Improve SIG_DFL/SIG_IGN handling
* Remove PAL_GetTerminationExitCode
* Use sa_handler/sa_sigaction based on SA_SIGINFO; remove HAVE_SIGINFO_T.
* configure.cmake: remove siginfo_t check
* Move restore_signal_and_resend so OSX can use it; add function documentation
* Fix OSX build: include pal/process.h for gPID
* Check SIG_IGN and SIG_DFL against sa_handler
* Don't use sa_handler when SA_SIGINFO is set
* Fix equality check
* Swap order of checking SA_SIGINFO and SIG_IGN/SIG_DFL
|
|
Changed to PAL's GetTempPathA to get the temp path.
|
|
strlen/wcslen works just fine.
|
|
- Delete clix support from PAL. "clix" was launcher in the Rotor days - like "dotnet" today.
- Delete URL parsing from PALRT
|
|
* Fixed bug in StackString where the size is not initialized correctly to STACK_COUNT
* Added CharString and WCharString template classes and a generic CharStringFromLPCWSTR method
* Added support for debugging a sandboxed app on Mac
This change fixes the usage of IPC while debugging while running in a sandbox. When running in a sandbox, the temporary folder for each process will be different. Thus the pipes being created in TwoWayPipe right now would be created in different directories in the debugger process and the process being debugged.
This change configures the folder to be used based on the application group ID that the sandboxed app belongs to.
For the same reasons, the names sempahores being used to synchronize the debugger attach need to be prefixed with the application group ID. This change was abit more involved since the name of the semaphore is limited to 31 characters, so we had to encode the semaphore names differently to make them shorter.
Last, new APIs to the debugger shim were added to support this new feature. This change only handles the runtime side and the dbgshim. An additional change to vsdbg needs to be done to use the new APIs.
fixes #21066
* Fixed build breaks on non Mac Unix platforms
* Fixed usage of gApplicationGroupId in non apple environments
* Fixed bug in semaphore names
* Got rid of usage of StackString
* Made PAL_GetApplicationGroupId Apple specific
* Added comment about pragma pack
* Fixed comment
* Added exported symbols
* Duplicated applicationGroupId so it can be used from another thread during register complete callback
* Renamed BitNum2ByteNum to GetExtraEncodedAreaSize to make intent clearer
* Fixed nit comments
* Removed redundant changes in StackString
* Fixed windows build break
* Fixed compilation switch from __APPLE to __APPLE__
* Added missing exports
|
|
Bug: 20766
|
|
Bug: 20786
|
|
Implement Native LoadLibrary API
This change commits the following changes:
1) Refactoring DllImport code to reuse LodLibrary by search for
pInvoke and LoadLibrary cases
2) Implement the new Native Library API in System.Runtime.Interop.Marshall
3) Add tests for the new APIs
|
|
* Refactor LoadLibrary Methods
This change refactors the code in DllImport in preparation
for implementing the new NativeLibrary API here:
dotnet/corefx#32015
The two main changes are:
1) A change in the semantics of the internal LoadLibrary helper functions.
When a native library is loaded, there are two categories of callers
expecting different return values:
External callers like AssemblyNative::InternalLoadUnmanagedDllFromPath()
and the upcoming System.Runtime.Interop.Marshall.LoadLibrary()
need the raw system handle
Internal callers like LoadLibraryModule() need the PAL registered handle
This change modifies the internal LoadLibraryModule* methods to work
in terms of native system handles, so that external callers can obrain
them directly. Methods requiring PAL-handles can register them explicitly.
There is no change in external signature of DllImport class, or the
native Dll cache in AppDomain class.
2) Differentiate HMODULE and NATIVE_LIBRARY_HANDLE
This change defines NATIVE_LIBRARY_HANDLE type to represent
raw system handles to native libraries that are not registered
with the PAL (On Unix systems).
The types on PAL and DlImport methods are adjusted to make
this semantic distinction explicit.
*
Fix loading LibC via PAL_LoadLibraryDirect()
|
|
|
|
* Added support for running in a sandbox on Mac
When running in a sandbox, the Mac operating system will limit access to resources, esp. the file system. Right now both Mutex and SharedMemory in the PAL are accessing the /tmp folder for which Mac does not provide the application permissions to access.
Instead, the sandbox provides the ability to share information between applications by using a shared container folder. This is done by registering the application with an Application Group ID. Using this ID, we can access the shared folder and read/write from it.
Since the .Net runtime can be loaded in multiple ways, we decided that the easiest way to let the runtime know what the application group ID is via an environment variable. Thus, if the NETCOREAPP_SANDBOX_APPLICATION_GROUP_ID environment variable is set (on Mac), the runtime will assume we are sandboxed, and will use the value provided as the application group ID. Note that due to limitations on semaphore file lengths, we will not allow application group IDs longer than 13 characters. This gives us 10 characters for the developer ID, and 3 extra characters for the group name.
When sandbox is disabled (the environment variable is empty) then the folder for Mutex and SharedMemory will continue to be rooted in /tmp. However when the sandbox is enabled, these files will be created under /user/{loginname}/Library/Group Containers/{AppGroupId}/.
Fixes #20473
* Made gApplicationContainerPath a pointer so it does not get automatically deleted by the c runtime
* Made s_runtimeTempDirectoryPath and s_sharedMemoryDirectoryPath pointers so they are not automatically deleted by the c runtime
* Renamed gApplicationContainerPath to gSharedFilesPath
* Renamed NETCOREAPP_SANDBOX_APPLICATION_GROUP_ID to DOTNET_SANDBOX_APPLICATION_GROUP_ID
* Fixed usage of VerifyStringOperation
* Replaced new with InternalNew
* Wrapped Apple specific code with #ifdef
* Added exception handling during close
* Moved VerifyStringOperation macro into SharedMemoryManager
* Moved PathCharString variable declarations before AutoCleanup is declared.
* Fixed initialization functions not to throw
* Renamed CopyPath to BuildSharedFilesPath
* Fixed misc nits
* Fixed implicit conversions from BOOL to bool
* Moved MAX_APPLICATION_GROUP_ID_LENGTH inside ifdef APPLE
* Removed PAL_IsApplicationSandboxed
|
|
* Adding BitIncrement, BitDecrement, CopySign, MaxMagnitude, and MinMagnitude to Math and MathF
* Adding FusedMultiplyAdd, IlogB, Log2, and ScaleB to Math and MathF
* Adding some basic PAL tests for fma, ilogb, log2, and scalbn
* Fixing a couple typos and adding clarifying comments
* Fixing the MSVC _VVV FCALL declarations
|
|
The BitScanForward/BitScanForward64 wrapper functions from the PAL and
gcenv have been modified so they're faster (and branchless), while also
adhering more closely to the behavior of the MSVC intrinsics.
Use _BitScanForward64 when targeting 64-bit Windows.
The _WIN32 macro is always defined by MSVC, even when targeting 64-bit
versions of Windows. Use the _WIN64 macro instead to check whether the
build is targeting 64-bit Windows, and if so, use the _BitScanForward64
intrinsic for the BitScanForward64 wrapper instead of the 32-bit-based
fallback.
|
|
* Moving parsing from TypeNameParser ctor to a separate method.
It seems a bit odd to have the constructor parsing and then use
a dummy method (MakeRotorHappy) to make it look more normal.
* Remove CorMarkThreadInThreadPool.
It is neither referenced nor exported.
* Remove reference to rotor from securitywrapper.h
* Remove reference to rotor from Strike/vm.cpp.
This file is only built for Windows.
* Remove reference to rotor from debugreturn.h
This is the only file the defines these macros, so there is no need to
undef them first.
* Remove unused code refering to rotor from PAL.
* Remove references to Rotor from PAL.
* Remove references to deleted tests from DisabledTests.txt
I can't find any evidence that this file is actually used.
* Remove unneeded casts.
* Remove dead and misleading code from profilinghelper.cpp.
FEATURE_PROFAPI_EVENT_LOGGING is always defined when PROFILING_SUPPORTED
is defined. And the entire contents of profilinghelper.cpp is surrounded
with "ifdef PROFILING_SUPPORTED". So all sections in
"ifndef FEATURE_PROFAPI_EVENT_LOGGING" are dead.
Furthermore, in coreclr this does not use the eventlog, so the macro name
is misleading.
* Remove dead code in excep.cpp.
This entire function is surrounded with "ifndef FEATURE_PAL".
* Remove refererences to rotor from safemath.h
This does not appear to cause any compile problems, so nobody was using
safemath.h without _ASSERTE defined.
Also S_SIZE_T_WP64BUG is not used anywhere.
* Remove dead code from palclr.h.
I don't know why these check to see if the macro is undefined immediately
after defining them.
Also the comment appears to reference some unions that are no longer in
this file.
* Expose ISymUnmanagedWriter2 from SymWriter as required by COM.
The comment talks about the C# compiler using this, however I cannot see
a way for the C# compiler to get an instance of this. It is only used
internally by AssemblyBuilder and not exposed otherwise.
* Restore check for _ASSERTE in safemath.h.
On Windows sometimes that this file is included without
_ASSERTE being defined. As the existing comment suggests, it appears
that SOS explicitly does not want _ASSERTE to do anything.
|