From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gemini Lasswell Newsgroups: gmane.emacs.bugs Subject: bug#31688: 26.1.50; Byte compiler confuses two string variables Date: Sat, 02 Jun 2018 10:51:18 -0700 Message-ID: <87a7sdkrft.fsf@runbox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1527961868 25108 195.159.176.226 (2 Jun 2018 17:51:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 2 Jun 2018 17:51:08 +0000 (UTC) To: 31688@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 02 19:51:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPAgB-0006PB-77 for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Jun 2018 19:51:03 +0200 Original-Received: from localhost ([::1]:60627 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPAiI-0000BE-9Q for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Jun 2018 13:53:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPAiB-0000Aw-DV for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 13:53:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPAi8-0002Se-BP for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 13:53:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51625) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPAi8-0002SX-7V for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 13:53:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fPAi6-00084E-18 for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 13:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gemini Lasswell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Jun 2018 17:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 31688 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.152796193030785 (code B ref -1); Sat, 02 Jun 2018 17:53:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Jun 2018 17:52:10 +0000 Original-Received: from localhost ([127.0.0.1]:59522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPAhG-00080T-2E for submit@debbugs.gnu.org; Sat, 02 Jun 2018 13:52:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPAhC-0007zQ-1A for submit@debbugs.gnu.org; Sat, 02 Jun 2018 13:52:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPAh5-0001IV-W5 for submit@debbugs.gnu.org; Sat, 02 Jun 2018 13:52:00 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:52707) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fPAh5-0001IN-SU for submit@debbugs.gnu.org; Sat, 02 Jun 2018 13:51:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPAh4-00007z-Lf for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 13:51:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPAh1-0001FV-JP for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 13:51:58 -0400 Original-Received: from aibo.runbox.com ([91.220.196.211]:51814) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPAh1-0001CI-7t for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 13:51:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=rbselector1; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=AY8LKmaSi0CjwOy/Xr3EkZmejzFCUIZKsPJnd1c5naw=; b=FinkwE+DfSktNHh9142zFFPh9 1k9yOrP2GD8RlVyVbKyPAaJ19xvPIFr4ef1tjSQR1/ArDZBcvoilCz/K/LFe8QvgRTUwjRI77kNdx j9SvC1iksPxVGZ+xKvLjmePa7E//KDtXRaxn9e45/yAGy1Jv8JMfCRUK9gtX4U+3rh+xYeNa+txHJ B4WbSWUQ4k+R5imiqRlQdHxKo6XowR0Ucuvoe0lLSanUOzB46uIm5UW48IUiUeKeHn6uUIlAXINoT E/lFQjuktQqe11IyHJo1uk4J6ZDGlqZzvSR+eNWo/9f3YHTyR+opMhmzt3Vqci7hdhOF5BU3qTSRr JlpHRl3cw==; Original-Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1fPAgy-0003uA-Ua for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 19:51:53 +0200 Original-Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=sockeye) by mailfront10.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1fPAge-0002BF-G2 for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 19:51:33 +0200 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146873 Archived-At: Here is a test which succeeds when interpreted and fails when byte-compiled. The byte compiler is apparently confusing two string variables, or optimizing away one of them. I've tried it both with and without lexical-binding with the same results. To reproduce, save this to bug.el: (require 'ert) (ert-deftest test-strings-props () (let* ((str1 "abcdefghij") (obj '(a b)) (str2 "abcdefghij")) (put-text-property 0 5 'test obj str2) (should (equal "\"abcdefghij\"" (prin1-to-string str1))))) Then: C-u M-x byte-compile-file RET bug.el RET M-x ert RET t RET Result: (ert-test-failed ((should (equal "\"abcdefghij\"" (prin1-to-string str1))) :form (equal "\"abcdefghij\"" "#(\"abcdefghij\" 0 5 (test (a b)))") :value nil :explanation (arrays-of-different-length 12 32 "\"abcdefghij\"" "#(\"abcdefghij\" 0 5 (test (a b)))" first-mismatch-at 0)))