Skip to content

Commit

Permalink
linux: Assert that memfd write() succeeds
Browse files Browse the repository at this point in the history
For now, until we improve our error-handling.
  • Loading branch information
oleavr committed May 2, 2024
1 parent 252e3e4 commit 69bf559
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/linux/frida-helper-backend.vala
Original file line number Diff line number Diff line change
Expand Up @@ -3227,7 +3227,8 @@ namespace Frida {

var fd = new FileDescriptor (memfd_create (name, 0));
unowned uint8[] data = bytes.get_data ();
Posix.write (fd.handle, data, data.length);
ssize_t n = Posix.write (fd.handle, data, data.length);
assert (n == data.length);
return fd;
}

Expand Down

0 comments on commit 69bf559

Please sign in to comment.