From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9632 invoked from network); 8 May 2022 20:14:50 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 8 May 2022 20:14:50 -0000 Received: from mail-io1-f51.google.com ([209.85.166.51]) by 9front; Sun May 8 16:13:05 -0400 2022 Received: by mail-io1-f51.google.com with SMTP id o190so13338887iof.10 for <9front@9front.org>; Sun, 08 May 2022 13:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:subject:message-id:in-reply-to:references:organization :mime-version:content-transfer-encoding; bh=UzP2ABZdrAW0UoYlTUjUEe6y9MRKTQGO29JNmYJGqSM=; b=YEks35I8o8oBb7ZedKGWL8URhxe8CLy/yQV2r+x1JE7/74uz35nrJU+dxqmYnLd3Ys wagNMvnWPsjFEWjzZPZyO2hMddE1T2thUBo9OC62Nk2LURnnipmz9Dx54ShMMZ87xsRr 0jdytNKoGme19nBPLpnrl9kO1APQjx2uqFMLM7ezLDj+Ok5l15ZumXlVrfOs8rxXOkcx ev7PsXHDTlCMOtNZH+U67bJxiTnRLJqK8mpwej8vmndGmhc3LRGBj5GhI6rYIwhqV0Br YG7jKJ7UvDVuxnT+R52z+DjUdcPTlXDiujGwVgIKzdul3Et4jM6drv9c4wAoiJS4T4ZC 2QaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=UzP2ABZdrAW0UoYlTUjUEe6y9MRKTQGO29JNmYJGqSM=; b=du6Qc29+SOjQA8Ns8d+11dYlnkC/Xm5d4yEuruoXmlm5yqiXfhsiKhz4tU56IdjEi8 4xeXsqfPtm6EJKUkcJcPTEbCAtEXFH8QakABXkBxMriWkW/WR2nw7S/NiCv7WjmoW4zM BHjDmfZy75ygZ3aqjPwRkC8XCVke+AaTRbAdQJFAunzdBtqlSXDPg/9OD4BzoWaZ96W0 tlc45Y6mjPb3DErWyLSFRkt91h+fSUTkAQQVTn8H5yjeY9LR9AwQqZduO/6CX9ET/6nT TGVLJyi8mmzpUKf4HEu/lF8Ewb1EHygyOEmfiMddhpiXVrgNvjnDVd9X0PjCTv/mZJkv peFg== X-Gm-Message-State: AOAM530J/qw1WMnMvGDpDN7BE2Sdl3UvRZbkpCjiX1A/pKfrbuLkFHTF 3toMWc9xvq1UJpP/Y4F6VHpxraUwqvQ= X-Google-Smtp-Source: ABdhPJz94+MSRvWU0f5ctkB9fk56BHO1virA/1cWCM7t0zTAcE5vjLJeffGy2RCYJ1RHtxTnkPEcNg== X-Received: by 2002:a05:6602:314c:b0:649:a265:72ee with SMTP id m12-20020a056602314c00b00649a26572eemr5095344ioy.100.1652040779639; Sun, 08 May 2022 13:12:59 -0700 (PDT) Return-Path: Received: from spruce.localdomain ([2601:246:4e03:dc20::43d]) by smtp.gmail.com with ESMTPSA id a6-20020a92c706000000b002cde6e352f3sm2697858ilp.61.2022.05.08.13.12.58 for <9front@9front.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 13:12:59 -0700 (PDT) Date: Sun, 8 May 2022 15:10:21 -0500 From: Amavect To: 9front@9front.org Message-ID: <20220508151021.7cc0f0df@spruce.localdomain> In-Reply-To: References: Organization: Amavect Industries X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: JSON over ActivityPub shader shader app polling backend Subject: Re: [9front] exec suicide: sys: bad address in syscall Reply-To: 9front@9front.org Precedence: bulk On Sun, 8 May 2022 17:38:27 +0000 istvan bak wrote: > term% 6.red 666: suicide: invalid address 0x7fff00000000/1 in sys call > execl("/bin/rc", "/bin/rc", "-c", cmd, 0); You have been bitten by varargs. The 4 bytes of 0x7fff00000000 is 32 bits. That 0 is a 32-bit integer. The 0 is not being converted due to varargs. Casting to (char*) or (void*) fixes your issue. See the warning when compiling this: print("%p", 0); warning: red.c:17 format mismatch p INT, arg 2 This is a problem in every C implementation. Varargs suck. For fun, the disassembly: without casting (MOVL moves a 32 bit value): rc+0x42 0x000000000020006a MOVL $0x0,0x20(SP) rc+0x4a 0x0000000000200072 CALL execl(SB) with casting (MOVQ moves a 64 bit value): rc+0x42 0x000000000020006a MOVQ $0x0,0x20(SP) rc+0x4b 0x0000000000200073 CALL execl(SB) Note that run2() doesn't cast, either. You got lucky that the higher 32 bits are zero. Thanks, Amavect