GNU bug report logs - #9912
valgrind warning in coding.c:coding_set_destination

Previous Next

Package: emacs;

Reported by: Dan Nicolaescu <dann <at> gnu.org>

Date: Sun, 30 Oct 2011 21:42:01 UTC

Severity: normal

Done: Dan Nicolaescu <dann <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Dan Nicolaescu <dann <at> gnu.org>
Subject: bug#9912: closed (Re: bug#9910: valgrind warning in
 coding.c:coding_set_destination)
Date: Mon, 07 Nov 2011 04:32:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#9912: 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 9912 <at> debbugs.gnu.org.

-- 
9912: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9912
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dan Nicolaescu <dann <at> gnu.org>
To: Kenichi Handa <handa <at> m17n.org>
Cc: 9910-done <at> debbugs.gnu.org, 9912-done <at> debbugs.gnu.org,
	9911-done <at> debbugs.gnu.org
Subject: Re: bug#9910: valgrind warning in coding.c:coding_set_destination
Date: Sun, 06 Nov 2011 23:28:38 -0500
Kenichi Handa <handa <at> m17n.org> writes:

> In article <yxq1utugnxb.fsf <at> fencepost.gnu.org>, Dan Nicolaescu <dann <at> gnu.org> 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).

[Message part 3 (message/rfc822, inline)]
From: Dan Nicolaescu <dann <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: valgrind warning in coding.c:coding_set_destination
Date: Sun, 30 Oct 2011 17:39:05 -0400
valgrind ./temacs 

produces this warning:

==30382== Conditional jump or move depends on uninitialised value(s)
==30382==    at 0x636022: Fcall_process (callproc.c:799)
==30382==    by 0x5D6C07: Ffuncall (eval.c:2956)
==30382==    by 0x5D5ABB: Fapply (eval.c:2422)
==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 0x5D5ABB: Fapply (eval.c:2422)
==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)
 
It looks like struct coding_system.dst_multibyte needs to be
initialized.



This bug report was last modified 13 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.