From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#45433: 28.0.50; byte/native-compiling ivy and ox-publish possibly miscompiled Date: Wed, 06 Jan 2021 00:13:36 +0000 Message-ID: References: <877dp59aev.fsf@collares.org> <87pn2xy7ys.fsf@collares.org> <87wnx5woli.fsf@collares.org> <87k0sziell.fsf@collares.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38130"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: mauricio@collares.org To: 45433@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 06 01:14:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kwwSt-0009mi-4c for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jan 2021 01:14:15 +0100 Original-Received: from localhost ([::1]:36080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwwSr-0007sZ-Hw for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Jan 2021 19:14:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwwSg-0007sI-A3 for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2021 19:14:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59693) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwwSg-0003UO-30 for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2021 19:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kwwSf-0003NL-Sd for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2021 19:14:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jan 2021 00:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45433 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: Mauricio Collares , 45433@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160989203912960 (code B ref -1); Wed, 06 Jan 2021 00:14:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Jan 2021 00:13:59 +0000 Original-Received: from localhost ([127.0.0.1]:43006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwwSd-0003My-9S for submit@debbugs.gnu.org; Tue, 05 Jan 2021 19:13:59 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:58462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwwSb-0003Mp-Gi for submit@debbugs.gnu.org; Tue, 05 Jan 2021 19:13:58 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwwSb-0007s6-Bm for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2021 19:13:57 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:52057) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwwSV-0003Pq-KV for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2021 19:13:57 -0500 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 1060DaVg007988; Wed, 6 Jan 2021 00:13:36 GMT In-Reply-To: (Andrea Corallo via's message of "Mon, 04 Jan 2021 22:12:20 +0000") Received-SPF: pass client-ip=205.166.94.24; envelope-from=akrl@sdf.org; helo=mx.sdf.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197404 Archived-At: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > Mauricio Collares writes: > >> Andrea Corallo writes: >> >>> Hi Mauricio, >>> >>> I had a look, this issue is not native compiler related as I get the >>> same behavior byte compiling. >>> >>> The trouble seems with `ivy-add-face-text-property' being defaliased, >>> ATM I'm not sure what is going on tho. >>> >>> Andrea >> >> Hi Andrea, >> >> Here's an attempt at a minimized testcase: >> >> * Contents of ~/ivy.el: >> >> (defun ivy--call-marked (action) >> (let* ((prefix-len (length ivy-mark-prefix)) >> (marked-candidates >> (mapcar >> (lambda (s) >> (let ((cand (substring s prefix-len))) >> (if ivy--directory >> (expand-file-name cand ivy--directory) >> cand))) >> ivy-marked-candidates)) >> (multi-action (ivy--get-multi-action ivy-last))))) >> >> (defalias 'ivy--file-local-name >> (if (fboundp 'file-local-name) >> #'file-local-name >> (lambda (file) >> (or (file-remote-p file 'localname) file)))) >> >> (provide 'ivy) >> >> * Run the following three commands (note that skipping either command 1 >> or command 2 makes the last command pass): >> >> $ emacs -Q --batch --eval "(add-to-list 'load-path \"/home/collares\")" >> -f batch-byte-compile ~/ivy.el >> >> $ emacs -Q --batch --eval "(add-to-list 'load-path \"/home/collares\")" >> --eval "(setq comp-eln-load-path '(\"/home/collares/\"))" -f batch-native-compile ~/ivy.el >> >> $ emacs -Q --batch --eval "(add-to-list 'load-path \"/home/collares\")" >> --eval "(setq comp-eln-load-path '(\"/home/collares/\"))" --eval "(require 'ivy)" >> >> With this, I still get the same error locally: > > Hi Mauricio, > > thanks for reducing, I can reproduce this version too. > > It looks more like a load issue then a miscompilation. All right I did some investigation. This is how the top level form looks in the .elc file: (byte-code "\300\301\302\303!\203\f^@\303\202^M^@\304\"\210\305\306!\207" [defalias xxx--file-local-name fboundp file-local-name #[257 "\300^A\301\"\206^H^@\211\207" [file- remote-p localname] 4 "\n\n(fn FILE)"] provide xxx] 4) When we execute this from the .elc in exec_byte_code we have: (gdb) p *(bytestr_data+10) $43 = 13 '\r' While loading from .eln we have: (gdb) p *(bytestr_data+10) $31 = 10 '\n' ATM I've no idea why of this difference, I'm pretty sure in the eln we have 13 so might be a reader miss-configuration? I'll look into it more to see where the difference is coming from, hopefully should be pretty narrowed at this stage. Andrea