You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Service Disc] Change type layout to make it x86 safe (#7387)
## Summary of changes
Change service discovery result type to work in x86 systems.
## Reason for change
tested locally removing x64 guards it works on both
## Implementation details
use a mix of sequential and explicit layouts
## Test coverage
## Other details
<!-- Fixes #{issue} -->
<!-- ⚠️ Note:
Where possible, please obtain 2 approvals prior to merging. Unless
CODEOWNERS specifies otherwise, for external teams it is typically best
to have one review from a team member, and one review from apm-dotnet.
Trivial changes do not require 2 reviews.
MergeQueue is NOT enabled in this repository. If you have write access
to the repo, the PR has 1-2 approvals (see above), and all of the
required checks have passed, you can use the Squash and Merge button to
merge the PR. If you don't have write access, or you need help, reach
out in the #apm-dotnet channel in Slack.
-->
/// **DO NOT USE THIS TYPE in x86** to map with Libdatadog. OK and Err fields needs a 4 offset instead.
14
13
/// Do not change the values of this enum unless you really need to update the interop mapping.
15
14
/// Libdatadog interop mapping of the generic type: https://github.com/DataDog/libdatadog/blob/60583218a8de6768f67d04fcd5bc6443f67f516b/ddcommon-ffi/src/result.rs#L44
16
15
/// Cf also ddog_Result_TracerMemfdHandle in common.h headers.
17
16
/// </summary>
18
-
[StructLayout(LayoutKind.Explicit)]
17
+
[StructLayout(LayoutKind.Sequential)]
19
18
internalstructTracerMemfdHandleResult
20
19
{
21
-
[FieldOffset(0)]
22
20
publicResultTagTag;
23
21
24
-
// beware that offset 8 is only valid on x64 and would cause a crash if read on x86.
0 commit comments