Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libs/libc/modlib/modlib_bind.c: Fix system crash if modlib_bind fails #355

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

jlaitine
Copy link

Addrenv is changed to the newly created process' one in the beginning of modlib_bind, and needs to be changed always when returning from the function; also in error cases.

@pussuw
Copy link

pussuw commented Feb 13, 2025

Is this something that was broken when libelf was removed ?

@jlaitine
Copy link
Author

Is this something that was broken when libelf was removed ?

linking just fails with one of the PX4 modules in px5 v1.15.3 rebase. The real reason why it fails I didn't study yet; I think this is still worth fixing

@pussuw
Copy link

pussuw commented Feb 13, 2025

Is this something that was broken when libelf was removed ?

linking just fails with one of the PX4 modules in px5 v1.15.3 rebase. The real reason why it fails I didn't study yet; I think this is still worth fixing

Yes of course worth fixing, I was just wondering is this something that was broken when libelf was removed and replaced by modlib. And to answer my own question, this is exactly what happened..

Thanks for fixing this !

Addrenv is changed to the newly created process' one in the beginning of
modlib_bind, and needs to be changed always when returning from the function;
also in error cases.

Signed-off-by: Jukka Laitinen <[email protected]>
@jlaitine
Copy link
Author

Picked the ~same commit from upstream PR

@jlaitine jlaitine merged commit 226ed1c into master Feb 13, 2025
10 checks passed
@jlaitine jlaitine deleted the fix_modlib_bind branch February 13, 2025 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants