From unknown Sat Aug 16 14:51:33 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#9910 <9910@debbugs.gnu.org> To: bug#9910 <9910@debbugs.gnu.org> Subject: Status: valgrind warning in coding.c:coding_set_destination Reply-To: bug#9910 <9910@debbugs.gnu.org> Date: Sat, 16 Aug 2025 21:51:33 +0000 retitle 9910 valgrind warning in coding.c:coding_set_destination reassign 9910 emacs submitter 9910 Dan Nicolaescu severity 9910 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 30 17:40:53 2011 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 06 21:41:30 2011 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 To: Dan Nicolaescu Subject: Re: bug#9910: valgrind warning in coding.c:coding_set_destination 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-Debbugs-Envelope-To: 9910 Cc: 9910@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: -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 debbugs-submit-bounces@debbugs.gnu.org Sun Nov 06 23:31:31 2011 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). From unknown Sat Aug 16 14:51:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 05 Dec 2011 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator