Repository navigation
native interop: fix syslog on Apple arm64, stop starting getprop - #325
Merged
Merged
Conversation
FreeAndNil
added a commit
that referenced
this pull request
Sep 21, 2026
- SystemInfo ran "getprop ro.build.user" on every Unix host, via PATH - first PATH match decided the answer - now /system/bin/getprop, plus the platform itself off net462 - System.Diagnostics.Process out of the startup path audit da18b6f-f048
FreeAndNil
force-pushed
the
Feature/325-native-interop
branch
from
September 21, 2026 20:15
ed5e345 to
7842360
Compare
FreeAndNil
added a commit
that referenced
this pull request
Sep 21, 2026
- process level env var tests restore through a using, not by hand - ProcessLevelEnvironmentVariable leaked the variable on a failed assert - Machine and User targets keep cleaning up themselves, not covered
FreeAndNil
added a commit
that referenced
this pull request
Sep 21, 2026
- FormatMessage allocates with LocalAlloc, the ref string marshalling freed it as COM task memory - now out IntPtr, PtrToStringUni over the returned length, LocalFree in a finally - hygiene, not a fix: the probe found the block inside the process heap - WindowsAllocatorProbeTest replaced by NativeErrorTest audit da18b6f-f045
FreeAndNil
added a commit
that referenced
this pull request
Sep 21, 2026
- a variadic argument goes on the stack on Apple arm64, a fixed one in a register, so the callee read the wrong slot - declaring it variadic is out: CoreCLR refuses a __arglist P/Invoke - only the two fixed parameters now, record as the format string with every percent sign doubled - logged text, length and platforms that worked stay as they were - VariadicAbiProbeTest replaced by the escaping and signature tests audit da18b6f-f046
- SystemInfo ran "getprop ro.build.user" on every Unix host, via PATH - first PATH match decided the answer - now /system/bin/getprop, plus the platform itself off net462 - System.Diagnostics.Process out of the startup path audit da18b6f-f048
- process level env var tests restore through a using, not by hand - ProcessLevelEnvironmentVariable leaked the variable on a failed assert - Machine and User targets keep cleaning up themselves, not covered
- FormatMessage allocates with LocalAlloc, the ref string marshalling freed it as COM task memory - now out IntPtr, PtrToStringUni over the returned length, LocalFree in a finally - hygiene, not a fix: the probe found the block inside the process heap - WindowsAllocatorProbeTest replaced by NativeErrorTest audit da18b6f-f045
- a variadic argument goes on the stack on Apple arm64, a fixed one in a register, so the callee read the wrong slot - declaring it variadic is out: CoreCLR refuses a __arglist P/Invoke - only the two fixed parameters now, record as the format string with every percent sign doubled - logged text, length and platforms that worked stay as they were - VariadicAbiProbeTest replaced by the escaping and signature tests audit da18b6f-f046
FreeAndNil
force-pushed
the
Feature/325-native-interop
branch
from
September 24, 2026 09:12
56334ea to
7202528
Compare
FreeAndNil
marked this pull request as ready for review
September 24, 2026 09:13
fluffynuts
approved these changes
Sep 25, 2026
This was referenced Oct 1, 2026
This was referenced Oct 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixed
LocalSyslogAppenderpassed a variadic argument tosyslog(3), audit da18b6f-f046read a slot the runtime never wrote: stack bytes in the system log, or a crash
__arglistP/Invoke, so only the two fixedparameters are declared and the record goes in as the format string with every
%doubledChanged
SystemInforangetprop ro.build.userat type initialisation on every Unix host, offPATH,so the first match there decided the answer
/system/bin/getprop, and the platform itself off net462FormatMessagebuffer was released by the wrong allocator, audit da18b6f-f045LocalAlloc, theref stringmarshalling freed it as COM task memoryout IntPtr,PtrToStringUniover the returned length,LocalFreein afinallyTests