3 ms·
Honestly the best part of shared libraries in my opinion isn't that they save space and memory. It's that when there is a security bug in libc I don't have to u
by gpm 8y ago
Honestly the best part of shared libraries in my opinion isn't that they save space and memory. It's that when there is a security bug in libc I don't have to update everything.
- pjmlp 8y agoAnd make it relatively painless to create plugins with more performance vs using IPC. On the other hand if they crash or contain memory corruption bugs, the host process suffers as well.
- foota 8y agoThe corollary being that you don't need to worry about breaking things when upgrading libc
- gpm 8y agoWell sure, but at least for networked services (which is unfortunately a substantial fraction of the binaries on my computer) I'd happily take the security over functionality tradeoff. If things don't work, I notice and fix it. If things aren't secure, I don't notice, get hacked, and my files get ransomed back to me.
- zaarn 8y agoYou could have both, in theory. Ie, use static linking unless a compatible version of the library is present on disk with a higher version number at runtime.
- AnIdiotOnTheNet 8y agoThat won't prevent the higher version from breaking your application.
- zaarn 8y agoIn theory it could, simply remove the newer version and the app uses it's internal library again. Or alternatively, like LD_PRELOAD, just have an env variable; LD_DONT_PRELOAD. Though that would make it more complicated.