Re: Deprecate setjmp/longjmp? [was Re: Maybe it's time to get rid of tcpwrappers/tcpd?]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/28/2014 09:52 AM, Nikos Mavrogiannopoulos wrote:

setjmp and longjmp are tools, that one may use in a good or bad way.
Along the same lines one could argue for dropping programs that use goto
in Fedora (because everyone knows that goto is bad).

All compliant uses of setjmp/longjmp can be replaced with C++ exceptions. I'm sure such a change would be somewhat controversial.

To the point, if a program uses setjmp and longjmp it is often that
there was no other way to do it. You cannot for example have a
co-routine/fiber implementation in C without setjmp() and longjmp().

I'm pretty sure it's one of the misuse scenarios. As specified, these functions cannot be used for unrestricted stack switching. Performance of setjmp/longjmp is also extremely poor because these functions save and restore much more context than needed.

--
Florian Weimer / Red Hat Product Security Team
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux