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=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22423 invoked from network); 16 Feb 2023 18:18:33 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 Feb 2023 18:18:33 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1676571513; b=rboTJXaYmE1TTO3sdqoCp1NWcIJ5hnVZorLTG2L1gYCg303KulWBazYn88P0T5mMyfxc3KGeQ5 IeDNYX692aPukgxUJMGApMVkY7oa4SBzI+CarFKwOhOkrwKegdDRdF4az+0GA/wdwvmc4ZaJmC KlEfgLdxXanM7vuCDVCsuXqixEWZVvmf1zB0/RrxS/CXow9iGyPZJ/LGJoPovb9W8sS+pYU66J IJ/TSPShJA2SDOLo5FMb/2wnPLigx2gK1FhVhSQCma6OgQ0FrpGNMjp+KFjXdIb/8vgxtyXJjb VwH8JjiyWAkG25VT3BMb7We2BgRm50vKMYo/ogon7hcr2w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f54.google.com) smtp.remote-ip=209.85.208.54; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1676571513; bh=5YyHPkjya/zudYKna2TJoeZ3bPyVZemJ/lgwKuTqAe8=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=m0iP9WSne74v0oMkOtAzJtg1WMWjISuWxha6RsQ58lutqEJzQDaxlUr8s2ADh6GTMHqvdwp0c2 TR9AT8AlFvpL0Bjy5bdtqHAA/Oelypy19GC46OzUWOiIn9tzAwRXcPQb59nEuhDPVo3zWJbZ6v FNlpsMnKtG6qFW5sCqdO11CdlhYWl0u2FRjoIjQY8GHDkb3PiVKhDvwsnWTAr1bpsZHPr/Egzu +AinuimjUSF2ry/iqMNLTmMATwD8/MMO1pJxE1+g/iS2K/tvCdnh5vn0GqHZwA8BYQejG0ORUW Gl38+EAsTQOkNM5w07Gm791NmKOwua+ZjNcBaW7630s9YQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Glnw5eESice01bBd4h110UfUfPKDLe1gHJoWXiAmMMk=; b=EwBS76LIonY2ynl6OrxQsVnVVd 1k3AuDNvOneebUN232IZNoh64m2sVPSlfH/8EhQHL7ar9/4FvZSiNHR5KNhm7ibyhG4IVunbtKtgx ggoqE/DuUPhtLUFRq6gNuTp+uREBiY4G9AYsSUME+a2At8W7qpbzFSSc27A8hQv4DxYKntKBR7b5v b1FDJUpvU7z3u0iJzLTAbJKVAbEEvE9pUPHptrwgeXy1x+oVQKA1EyReuxEjc8Lfp7hEeTNSe4jhH lkUImKlOw9slXSCW0pbNQBmhEteXtBXZg1UzmRlG3d9yPFuf96C+VvagMRWVEqc1xaGjtgqwC9kdn SVaS8sGw==; Received: by zero.zsh.org with local id 1pSiq0-000EuQ-N1; Thu, 16 Feb 2023 18:18:32 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f54.google.com) smtp.remote-ip=209.85.208.54; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f54.google.com ([209.85.208.54]:37613) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pSioo-000EZb-Gb; Thu, 16 Feb 2023 18:17:19 +0000 Received: by mail-ed1-f54.google.com with SMTP id c1so6188360edt.4 for ; Thu, 16 Feb 2023 10:17:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Glnw5eESice01bBd4h110UfUfPKDLe1gHJoWXiAmMMk=; b=l3Jsky1SvvNUtuwTLesWMyhiAOAAWA9bMu3t4zi5+wfkAU5ZiSnCq7GkWdyFlHOm0q E35iwya+mEQbUnzYoiAejZ7pSPWtuFxyOtdjPc7dwdf9PWaH+04xKXzkFf0C2BHnzlfJ FiK0Yq0WOn1tQL0L7rtiyNGZzIk8y8gJbvj9J+hCOLBy1Ch+/C2i1UWv+1BDKh0Hgaab J31qnwyp7BUXoGoCdurbTrgoQHicqNEs/6yVzlqrea2TH+bRoKYFOKXPi6z+5AdjFsRK 9gUtJ+t9diQzjyB3L0tkBhScKmcJb550zAM710XqFT31ne14VogUu5uE3vYWSaVeAMdF E5Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Glnw5eESice01bBd4h110UfUfPKDLe1gHJoWXiAmMMk=; b=EKZNWJtmAGfRkGgYJDXSUdV4+E0KsDf2zH24/PKt6SkRIiyK35oqzZDG5O+NZKg9Fs qMTKuDMJ9e1nE1x0TR46VW9V6Yb3i0+ESN39xCIo9zuGmVv6R2qZnuvqBTHVHY7JwkSL /JB/O75uopsv0lhgE4J8jTLV4qQlMm/erp1u2oZVHxeL9HdfVHyvYEoQP/VqUj7OHSvS QWZHAlgZpY0lidB75mwW4ChNaEsIM9UUTyMugtoue7pUNTHwOjj2uRo66kgpWXz+frMR 75yMWHEdH/sBR337KF8cCk/6H3z2q0ffo1zTjxar5S4c90lP6aFFGsvT/e87eG/tcHws OsvA== X-Gm-Message-State: AO0yUKXn732YU08XgPJTVJ7N2dSHeXLbqiu6rbr+6tOrzQRBFA0fFgop G3q+BgTs0HzkDt15dLUCqxFBXOTt8/BkdawFOnYBGQ== X-Google-Smtp-Source: AK7set8P/CozksHG70kfcufmhbEH+4zZ+Oqw5RnR7pE5q3snYesg9jdTRc8fTsMzH5zN8SjMKhCkgnUXnMu9/MxLOl4= X-Received: by 2002:a17:906:6d10:b0:888:7a3e:1d7f with SMTP id m16-20020a1709066d1000b008887a3e1d7fmr3240952ejr.12.1676571437782; Thu, 16 Feb 2023 10:17:17 -0800 (PST) MIME-Version: 1.0 References: <1249162537.4244630.1676386019653@mail.virginmedia.com> <1911575874.92635.1676392609186@mail.virginmedia.com> <1919749331.2020682.1676562737303@mail.virginmedia.com> In-Reply-To: <1919749331.2020682.1676562737303@mail.virginmedia.com> From: Bart Schaefer Date: Thu, 16 Feb 2023 10:17:06 -0800 Message-ID: Subject: Re: zmodload (-u?) changing options (was Re: [PATCH] Named reference typos & misc.) To: Peter Stephenson Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 51444 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Thu, Feb 16, 2023 at 7:53 AM Peter Stephenson wrote: > > Might be something valgrind could help with, it's hard to see how > this could be deliberate even as an obscure side effect. I rigged up a script as Src/zsh so that I could invoke valgrind from the test harness. Got multiple invalid reads for this block: ==746398== Block was alloc'd at ==746398== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgprel oad_memcheck-amd64-linux.so) ==746398== by 0x190208: zalloc (mem.c:966) ==746398== by 0x1903B9: zshcalloc (mem.c:979) ==746398== by 0x19B2CD: createparam (params.c:1061) ==746398== by 0x1A1048: assignsparam (params.c:3130) ==746398== by 0x1A1D02: setsparam (params.c:3240) ==746398== by 0x19270F: add_autoparam (module.c:1215) ==746398== by 0x19862A: autofeatures (module.c:3612) ==746398== by 0x19686F: unload_module (module.c:2902) ==746398== by 0x196A04: unload_named_module (module.c:2949) ==746398== by 0x196ABD: bin_zmodload_load (module.c:2971) ==746398== by 0x1957AD: bin_zmodload (module.c:2499) module.c:2902 would be: 2898 /* 2899 * Module has autoloadable features. Restore them 2900 * so that the module will be reloaded when needed. 2901 */ 2902 autofeatures("zsh", m->node.nam, 2903 hlinklist2array(m->autoloads, 0), 0, FEAT_IGNORE); ==746398== Address 0x643b030 is 16 bytes inside a block of size 80 free'd ==746398== at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreloa d_memcheck-amd64-linux.so) ==746398== by 0x1907C9: zfree (mem.c:1871) ==746398== by 0x1A80C3: freeparamnode (params.c:5818) ==746398== by 0x1A4681: unsetparam_pm (params.c:3779) ==746398== by 0x19206F: checkaddparam (module.c:1052) ==746398== by 0x19209A: addparamdef (module.c:1065) ==746398== by 0x192463: setparamdefs (module.c:1174) ==746398== by 0x197E48: setfeatureenables (module.c:3367) ==746398== by 0x197EC3: handlefeatures (module.c:3385) ==746398== by 0x1F7CC5: enables_zshQsparameter (parameter.c:2333) ==746398== by 0x193164: enables_module (module.c:1948) ==746398== by 0x1936C6: do_module_features (module.c:2109) So, what's going on here? I tried checking the "incleanup" static inside Src/Modules/parameter.c enables_(), but it's not set [before entering enables_()] during that call stack.