04-30-2024, 07:50 PM
(This post was last modified: 05-03-2024, 02:16 AM by dragonhospital.)
Attachment bug presists. Has anyone got the patch working https://github.com/dennisameling/Signal-...1817767085 on version 6.47 and newer?
fs.write(file, '' has been changed to fs.writeFile(file, '' although the patch above no longer works.
What is the full path to node_modules/fs-extra/lib/ensure/file.js ? The docker contains many copies of node_modules/fs-extra/lib/ensure/file.js
Code:
.ensureFile() call seems to be causing EFAULT of the write systemcall in arm64 environment.
I am not expert of node.js but I think:
ensureFile is implemented by fs-extra/lib/ensure/file.js as function createFile (file, callback)
createFile() is calling fs.write(file, '') in order to create empty file to target path.
fs.write() is dispatched to write() systemcall, but when 2nd parameter of fs.write() is empty (''), 2nd parameter of write systemcall is pointing invalid address.
My workaround:
Change fs.write(file, '') => fs.write(file, ' ') on node_modules/fs-extra/lib/ensure/file.js
Then now, I can send/receive attachments without EFAULT in my aarch64 chromebook linux.
I think root cause could be node.js or libuv? (somewhere dispatching to the write systemcall).
When empty buffer parameter passed to fs.WriteFile(), invalid const void *buf address is generated as the write() syscall parameter.
fs.write(file, '' has been changed to fs.writeFile(file, '' although the patch above no longer works.
What is the full path to node_modules/fs-extra/lib/ensure/file.js ? The docker contains many copies of node_modules/fs-extra/lib/ensure/file.js