Summary: | sys-apps/sandbox violation triggers infinite recursion from library constructor function | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Mike Gilbert <floppym> |
Component: | Sandbox | Assignee: | Sandbox Maintainers <sandbox> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | ryao |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Mike Gilbert
2012-02-16 04:54:37 UTC
I have uploaded my simple test case to my devspace if you would like to try it for yourself. http://dev.gentoo.org/~floppym/sandboxtest.tar the constructor we're using atm lacks priory, so it runs in an arbitrary order does it work if you do: -__attribute__((constructor)) +__attribute__((constructor(0))) (In reply to comment #2) Nope, same result. should be fixed by: http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=commitdiff;h=5498907383c7f1654188b6a0d02d8b03112a28c3 (really this just needed sbio_open to get initialized in the data section, but i figured might as well move as much out as possible while i was there) Confirmed. Thanks! (In reply to comment #4) unfortunately, that fix broke a different use case. if an app starts up and doesn't make any syscalls before main() and modifies the env, things don't get initialized properly. like `env -i env`. fixed thusly: http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=commit;h=d8b21b35fd536af8411975ad05eab85f89e84a2e you might want to double check i didn't re-break you |