Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.os.linux.misc Subject: Re: GOTO (was: Re: Warning - Serious 'sudo' Flaw Compromises Security) Date: 14 Oct 2025 00:30:01 GMT Lines: 18 Message-ID: References: <10cdluk$pc59$2@dont-email.me> <1NucnW53DZrMOHH1nZ2dnZfqnPGdnZ2d@giganews.com> <10cihiq$23kb8$6@dont-email.me> <10cios3$25sim$2@dont-email.me> <10cj667$29n96$5@dont-email.me> <10cjvkn$2gnrl$2@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net vDGw9I18L7uCQpjSxb3Log6d9/nQuBb+FG2ePAZlLogdwTkVvk Cancel-Lock: sha1:KbpYVvLBYUNFyMQdmU4lmVMQzcQ= sha256:AaB61kV8P50s24LTFRNCYSWDh9wfsXsXlJYUXWuoHPw= User-Agent: Pan/0.162 (Pokrosvk) Xref: csiph.com comp.os.linux.misc:76091 On Mon, 13 Oct 2025 23:48:55 +0100, Nuno Silva wrote: > I think the concern about GOTO as opposed to e.g. a function call where > supported is that the function call makes it clear where it is called > and to where it returns, while GOTO does not come with that structure. It's nowhere near as much fun as siglongjmp() :). Other than the bad old days of FORTRAN my goto use is local to the function, something like: if (test_failed) { goto exit; } It allows the function to have one entrance and one exit without the convoluted and deeply nested conditionals that might be needed otherwise. I think TNP pointed out in assembler all you have is JMP and its friends.