Skip to content

Commit 6900cce

Browse files
fix: InvalidOperationException sending attachments on Android with LLVM enabled (#4276)
* fix: InvalidOperationException when sending attachments on Android with LLVM enabled Resolves #3101: - #3101 Also see: - CA2022: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2022 - CA1835: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1835 * Update CHANGELOG.md
1 parent 3b47827 commit 6900cce

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
### Fixes
1111

1212
- The HTTP instrumentation uses the span created for the outgoing request in the sentry-trace header, fixing the parent-child relationship between client and server ([#4264](https://github.com/getsentry/sentry-dotnet/pull/4264))
13+
- InvalidOperationException sending attachments on Android with LLVM enabled ([#4276](https://github.com/getsentry/sentry-dotnet/pull/4276))
1314

1415
### Dependencies
1516

src/Sentry/Internal/PartialStream.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ public override async Task<int> ReadAsync(byte[] buffer, int offset, int count,
6060
_innerStream.Position = innerPosition;
6161
}
6262

63-
var read = await _innerStream.ReadAsync(buffer, offset, actualCount, cancellationToken)
63+
// See https://github.com/getsentry/sentry-dotnet/issues/3101
64+
var read = await _innerStream.ReadAsync(buffer.AsMemory(offset, actualCount), cancellationToken)
6465
.ConfigureAwait(false);
6566

6667
if (_length != null)

0 commit comments

Comments
 (0)