From unknown Mon Aug 18 14:22:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9910: valgrind warning in coding.c:coding_set_destination Resent-From: Dan Nicolaescu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Oct 2011 21:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9910 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 9910@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.132001085325367 (code B ref -1); Sun, 30 Oct 2011 21:41:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Oct 2011 21:40:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKd7d-0006b6-LH for submit@debbugs.gnu.org; Sun, 30 Oct 2011 17:40:53 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKd7c-0006az-CY for submit@debbugs.gnu.org; Sun, 30 Oct 2011 17:40:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKd5X-0003jb-FL for submit@debbugs.gnu.org; Sun, 30 Oct 2011 17:38:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:50084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKd5X-0003jX-Dr for submit@debbugs.gnu.org; Sun, 30 Oct 2011 17:38:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:34682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKd5W-0008B9-H4 for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 17:38:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKd5V-0003hY-4d for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 17:38:42 -0400 Received: from fencepost.gnu.org ([140.186.70.10]:37621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKd5U-0003hD-Vv for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 17:38:41 -0400 Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RKd5U-0006ds-I2 for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 17:38:40 -0400 From: Dan Nicolaescu Date: Sun, 30 Oct 2011 17:38:40 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.5 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) valgrind ./temacs produces this warning: ==30382== Conditional jump or move depends on uninitialised value(s) ==30382== at 0x499251: coding_set_destination (coding.c:1046) ==30382== by 0x4B477A: decode_coding (coding.c:7022) ==30382== by 0x4B7317: decode_coding_object (coding.c:7671) ==30382== by 0x63610F: Fcall_process (callproc.c:813) ==30382== by 0x5D6C07: Ffuncall (eval.c:2956) ==30382== by 0x5D5ECA: Fapply (eval.c:2479) ==30382== by 0x5D6C07: Ffuncall (eval.c:2956) ==30382== by 0x622C5B: exec_byte_code (bytecode.c:785) ==30382== by 0x5D77BA: funcall_lambda (eval.c:3205) ==30382== by 0x5D6F4C: Ffuncall (eval.c:3023) ==30382== by 0x622C5B: exec_byte_code (bytecode.c:785) ==30382== by 0x5D77BA: funcall_lambda (eval.c:3205) This looks like setup_coding_system (or whatever else initializes struct coding_system) does not initialize the src_pos field. From unknown Mon Aug 18 14:22:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9910: valgrind warning in coding.c:coding_set_destination References: Resent-From: Kenichi Handa Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Nov 2011 02:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9910 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dan Nicolaescu Cc: 9910@debbugs.gnu.org Received: via spool by 9910-submit@debbugs.gnu.org id=B9910.132063369125638 (code B ref 9910); Mon, 07 Nov 2011 02:42:02 +0000 Received: (at 9910) by debbugs.gnu.org; 7 Nov 2011 02:41:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNF9O-0006fT-Pp for submit@debbugs.gnu.org; Sun, 06 Nov 2011 21:41:30 -0500 Received: from mx1.aist.go.jp ([150.29.246.133]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNF9L-0006fI-M3 for 9910@debbugs.gnu.org; Sun, 06 Nov 2011 21:41:30 -0500 Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id pA72caiv007700; Mon, 7 Nov 2011 11:38:36 +0900 (JST) env-from (handa@m17n.org) Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id pA72ca36021719; Mon, 7 Nov 2011 11:38:36 +0900 (JST) env-from (handa@m17n.org) Received: by smtp1.aist.go.jp with ESMTP id pA72cZHw023176; Mon, 7 Nov 2011 11:38:35 +0900 (JST) env-from (handa@m17n.org) From: Kenichi Handa In-Reply-To: (message from Dan Nicolaescu on Sun, 30 Oct 2011 17:38:40 -0400) Date: Mon, 07 Nov 2011 11:38:35 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) In article , Dan Nicolaescu writes: > valgrind ./temacs > produces this warning: > ==30382== Conditional jump or move depends on uninitialised value(s) > ==30382== at 0x499251: coding_set_destination (coding.c:1046) > ==30382== by 0x4B477A: decode_coding (coding.c:7022) > ==30382== by 0x4B7317: decode_coding_object (coding.c:7671) > ==30382== by 0x63610F: Fcall_process (callproc.c:813) > ==30382== by 0x5D6C07: Ffuncall (eval.c:2956) > ==30382== by 0x5D5ECA: Fapply (eval.c:2479) > ==30382== by 0x5D6C07: Ffuncall (eval.c:2956) > ==30382== by 0x622C5B: exec_byte_code (bytecode.c:785) > ==30382== by 0x5D77BA: funcall_lambda (eval.c:3205) > ==30382== by 0x5D6F4C: Ffuncall (eval.c:3023) > ==30382== by 0x622C5B: exec_byte_code (bytecode.c:785) > ==30382== by 0x5D77BA: funcall_lambda (eval.c:3205) > This looks like setup_coding_system (or whatever else initializes struct > coding_system) does not initialize the src_pos field. I fixed it. But as "valgrind ./temacs" segfaults in my environment, I can't confirm the fix. Please check if the fix is correct or not. --- Kenichi Handa handa@m17n.org From unknown Mon Aug 18 14:22:17 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Dan Nicolaescu Subject: bug#9910: closed (Re: bug#9910: valgrind warning in coding.c:coding_set_destination) Message-ID: References: X-Gnu-PR-Message: they-closed 9910 X-Gnu-PR-Package: emacs Reply-To: 9910@debbugs.gnu.org Date: Mon, 07 Nov 2011 04:32:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1320640321-5573-1" This is a multi-part message in MIME format... ------------=_1320640321-5573-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #9910: valgrind warning in coding.c:coding_set_destination which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 9910@debbugs.gnu.org. --=20 9910: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D9910 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1320640321-5573-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 9910-done) by debbugs.gnu.org; 7 Nov 2011 04:31:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNGrr-0001R2-AX for submit@debbugs.gnu.org; Sun, 06 Nov 2011 23:31:31 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNGrp-0001Qp-BL; Sun, 06 Nov 2011 23:31:30 -0500 Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RNGp4-0008N2-6h; Sun, 06 Nov 2011 23:28:38 -0500 From: Dan Nicolaescu To: Kenichi Handa Subject: Re: bug#9910: valgrind warning in coding.c:coding_set_destination References: Date: Sun, 06 Nov 2011 23:28:38 -0500 In-Reply-To: (Kenichi Handa's message of "Mon, 07 Nov 2011 11:38:35 +0900") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 9910-done Cc: 9910-done@debbugs.gnu.org, 9912-done@debbugs.gnu.org, 9911-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Kenichi Handa writes: > In article , Dan Nicolaescu writes: > >> valgrind ./temacs > >> produces this warning: > >> ==30382== Conditional jump or move depends on uninitialised value(s) >> ==30382== at 0x499251: coding_set_destination (coding.c:1046) >> ==30382== by 0x4B477A: decode_coding (coding.c:7022) >> ==30382== by 0x4B7317: decode_coding_object (coding.c:7671) >> ==30382== by 0x63610F: Fcall_process (callproc.c:813) >> ==30382== by 0x5D6C07: Ffuncall (eval.c:2956) >> ==30382== by 0x5D5ECA: Fapply (eval.c:2479) >> ==30382== by 0x5D6C07: Ffuncall (eval.c:2956) >> ==30382== by 0x622C5B: exec_byte_code (bytecode.c:785) >> ==30382== by 0x5D77BA: funcall_lambda (eval.c:3205) >> ==30382== by 0x5D6F4C: Ffuncall (eval.c:3023) >> ==30382== by 0x622C5B: exec_byte_code (bytecode.c:785) >> ==30382== by 0x5D77BA: funcall_lambda (eval.c:3205) > >> This looks like setup_coding_system (or whatever else initializes struct >> coding_system) does not initialize the src_pos field. > > I fixed it. But as "valgrind ./temacs" segfaults in my > environment, I can't confirm the fix. Please check if the > fix is correct or not. Thank you very much! The fix looks good, the warning does not appear anymore. valgrind ./temacs also segfaults for me in 32 bit mode (i686), it works in 64 bit mode (x86_64). ------------=_1320640321-5573-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Oct 2011 21:40:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKd7d-0006b6-LH for submit@debbugs.gnu.org; Sun, 30 Oct 2011 17:40:53 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKd7c-0006az-CY for submit@debbugs.gnu.org; Sun, 30 Oct 2011 17:40:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKd5X-0003jb-FL for submit@debbugs.gnu.org; Sun, 30 Oct 2011 17:38:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:50084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKd5X-0003jX-Dr for submit@debbugs.gnu.org; Sun, 30 Oct 2011 17:38:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:34682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKd5W-0008B9-H4 for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 17:38:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKd5V-0003hY-4d for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 17:38:42 -0400 Received: from fencepost.gnu.org ([140.186.70.10]:37621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKd5U-0003hD-Vv for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 17:38:41 -0400 Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RKd5U-0006ds-I2 for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 17:38:40 -0400 From: Dan Nicolaescu To: bug-gnu-emacs@gnu.org Subject: valgrind warning in coding.c:coding_set_destination Date: Sun, 30 Oct 2011 17:38:40 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) valgrind ./temacs produces this warning: ==30382== Conditional jump or move depends on uninitialised value(s) ==30382== at 0x499251: coding_set_destination (coding.c:1046) ==30382== by 0x4B477A: decode_coding (coding.c:7022) ==30382== by 0x4B7317: decode_coding_object (coding.c:7671) ==30382== by 0x63610F: Fcall_process (callproc.c:813) ==30382== by 0x5D6C07: Ffuncall (eval.c:2956) ==30382== by 0x5D5ECA: Fapply (eval.c:2479) ==30382== by 0x5D6C07: Ffuncall (eval.c:2956) ==30382== by 0x622C5B: exec_byte_code (bytecode.c:785) ==30382== by 0x5D77BA: funcall_lambda (eval.c:3205) ==30382== by 0x5D6F4C: Ffuncall (eval.c:3023) ==30382== by 0x622C5B: exec_byte_code (bytecode.c:785) ==30382== by 0x5D77BA: funcall_lambda (eval.c:3205) This looks like setup_coding_system (or whatever else initializes struct coding_system) does not initialize the src_pos field. ------------=_1320640321-5573-1--