8000 Fix libc error detection by Lichtso · Pull Request #182 · solana-labs/rbpf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Fix libc error detection #182

Merged
merged 2 commits into from
Jun 15, 2021
Merged

Fix libc error detection #182

merged 2 commits into from
Jun 15, 2021

Conversation

Lichtso
Copy link
@Lichtso Lichtso commented Jun 15, 2021

posix_memalign and mprotect did not check for errors.

@Lichtso Lichtso added the bug Something isn't working label Jun 15, 2021
@Lichtso Lichtso force-pushed the fix/libc_error_detection branch 3 times, most recently from d342296 to 6f0effe Compare June 15, 2021 10:59
@Mrmaxmeier
Copy link

Note: mprotect might return -EAGAIN/-EINTR in strange edge-cases (lock contention in Linux's memory manager?):
https://elixir.bootlin.com/linux/latest/source/mm/mprotect.c#L541
It'd probably be safe to re-try the call in this case.

@Lichtso Lichtso force-pushed the fix/libc_error_detection branch 4 times, most recently from 01bb0cb to 38e64f9 Compare June 15, 2021 14:21
@Lichtso
Copy link
Author
Lichtso commented Jun 15, 2021

Note: mprotect might return -EAGAIN/-EINTR in strange edge-cases (lock contention in Linux's memory manager?):
https://elixir.bootlin.com/linux/latest/source/mm/mprotect.c#L541
It'd probably be safe to re-try the call in this case.

Thanks for the hint, I implemented a retry loop (with 3 trys max).

@Lichtso Lichtso force-pushed the fix/libc_error_detection branch from 38e64f9 to 36a0de3 Compare June 15, 2021 15:10
@Lichtso Lichtso merged commit 5178eda into main Jun 15, 2021
@Lichtso Lichtso deleted the fix/libc_error_detection branch June 15, 2021 16:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0