From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 1539 invoked from network); 3 Apr 2020 10:16:15 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with UTF8ESMTPZ; 3 Apr 2020 10:16:15 -0000 Received: (qmail 4177 invoked by alias); 3 Apr 2020 10:16:05 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45657 Received: (qmail 4946 invoked by uid 1010); 3 Apr 2020 10:16:05 -0000 X-Qmail-Scanner-Diagnostics: from smtpq4.tb.ukmail.iss.as9143.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25765. spamassassin: 3.4.2. Clear:RC:0(212.54.57.99):SA:0(-2.7/5.0):. Processed in 2.728721 secs); 03 Apr 2020 10:16:05 -0000 X-Envelope-From: p.w.stephenson@ntlworld.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _mailcloud.virginmedia.com designates 212.54.57.99 as permitted sender) X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-workers@zsh.org X-SourceIP: 172.25.160.137 X-CNFS-Analysis: v=2.3 cv=IPGZ9jnG c=1 sm=1 tr=0 a=wOjQ4in9RKFG6jhXMc4Ghg==:117 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=KEnZaF_ea6UA:10 a=IkcTkHD0fZMA:10 a=DoY9bV0jb9AA:10 a=tNg2AhtE3sgd4nZ48a8A:9 a=QEXdDO2ut3YA:10 X-Authenticated-Sender: p.w.stephenson@ntlworld.com Date: Fri, 3 Apr 2020 11:15:24 +0100 (BST) From: Peter Stephenson To: zsh-workers@zsh.org Message-ID: <625822760.3979791.1585908925002@mail2.virginmedia.com> In-Reply-To: <20200403081118.7031b5b9@tarpaulin.shahaf.local2> References: <20200403081118.7031b5b9@tarpaulin.shahaf.local2> Subject: Re: -o nobanghist -o emacs segfaults MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev64 X-Originating-IP: 165.225.81.56 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4wfMX6EY43jpokZyWPJmc4nKM3BKIOwdiFjOQFzlppXci5n1/gasekkf4YTk2RUbSUjCE9J8etZmt6T3ryqzQdpoi8s617TJuQmZqhLa9cM6QTdq/g6v12 8b+bZOOoQO6HFEaAu0YK+Klx73d2+OynObKc+R/6aTAWgX1Li3l6yQdYHdNaojEaWfhocvDbS0U541NOpwWZWSNTqZGWlr4zF9E= > On 03 April 2020 at 09:11 Daniel Shahaf wrote: > % b/Src/zsh -f -o nobanghist -o emacs > zsh: segmentation fault b/Src/zsh -f -o nobanghist -o emacs The option parser is passing the keymap to ZLE, which hasn't been loaded yet. Attempting to load it doesn't work because at the point of initial option parsing the basic definitions for the module system aren't set up. Moving up the initialisation of the module system could possibly expose some hairy dependencies. Probably the right thing to do is to detect this condition, remember the keymap, and pass it in later. I'm not entirely sure where the best place for this is, but as it's specific to initialisation and depends on the sequencing of that I suppose up in that code, rather than down in anything ZLE-specific. But at least the option parser needs to be aware this is init rather than run time. (See my previous ramblings on the theme "ZLE isn't really a self-contained module in the fullest acceptance of the term".) pws