Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 63470 Build 60354: arc lint + arc unit
Event Timeline
See https://github.com/rizsotto/Bear/issues/557 for the issue that prompted this and particularly the comment https://github.com/rizsotto/Bear/issues/557#issuecomment-2776259708
I think that the proper fix in line with the existing code is to use namespace.h to mangle execvpe reference in libc.
The bear problem still fixed but we are unable to intercept the execvpe call as it is replaced with _execvpe.
I think you need to bring the __weak_reference line back from the original change.
Using _execvpe is consistent, but perhaps it should be __libc_execvpe. The general _<foo> model is a remnant of libc_r and should perhaps be removed at some point.
lib/libc/gen/Symbol.map | ||
---|---|---|
460 ↗ | (On Diff #153445) | You can't remove previously exported public symbols. |
lib/libc/gen/exec.c | ||
301 | Remove | |
lib/libc/include/libc_private.h | ||
357 ↗ | (On Diff #153445) | Should not be required. |
lib/libc/include/namespace.h | ||
64–66 | White space is wrong and touching the execve line is bug. More importantly, you're missing a matching un-namespace.h change. |
You still need to add a an #undef execvpe line to un-namespace.h and then you shouldn't need the libc_private.h entry. The point of namespace.h/un-namespace.h is that the declarations are impacted by the macro so the execvpe declaration in unistd.h becomes an __libc_execvpe declaration which you can then use.
lib/libc/include/namespace.h | ||
---|---|---|
65 | If you changed the original symbol name, why the namespacing is still kept in the patch? |