Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

**Fixes**:

- Linux: handle `ENOSYS` in `read_safely` to fix empty module list in seccomp-restricted environments. ([#1655](https://github.com/getsentry/sentry-native/pull/1655))

## 0.13.7

**Features**:
Expand Down
7 changes: 5 additions & 2 deletions src/modulefinder/sentry_modulefinder_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,12 @@ read_safely(void *dst, void *src, size_t size)
// See https://github.com/getsentry/sentry-native/issues/578).
// Also, the syscall is only available in Linux 3.2, meaning Android 17.
// In that case we get an `EINVAL`.
// Additionally, in some seccomp-restricted environments,
// `process_vm_readv` may be unavailable and fail with `ENOSYS` (see
// https://github.com/getsentry/sentry-native/issues/1653).
//
// In either of these cases, just fall back to an unsafe `memcpy`.
if (!rv && (errno == EPERM || errno == EINVAL)) {
// In any of these cases, just fall back to an unsafe `memcpy`.
if (!rv && (errno == EPERM || errno == EINVAL || errno == ENOSYS)) {
memcpy(dst, src, size);
rv = true;
}
Expand Down
Loading