Skip to content

Commit

Permalink
Fix ifdef for RawArrayData in NativeAOT Runtime.Base. (#109494)
Browse files Browse the repository at this point in the history
The `BIT64` preprocessor symbol is not defined nor used anywhere in this
repository. This means that if you were to compile a Runtime.Base assembly
for 64-bit, helpers like `RhpLdelemaRef` would calculate an incorrect address.

This PR fixes the problem by using the `TARGET_64BIT` preprossor directive
instead. Just like the System.Private.CoreLib version of this class.
  • Loading branch information
AustinWise authored Nov 4, 2024
1 parent b199965 commit 9193971
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coreclr/nativeaot/Runtime.Base/src/System/Array.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal class Array<T> : Array
internal class RawArrayData
{
public uint Length; // Array._numComponents padded to IntPtr
#if BIT64
#if TARGET_64BIT
public uint Padding;
#endif
public byte Data;
Expand Down

0 comments on commit 9193971

Please sign in to comment.