unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9910: valgrind warning in coding.c:coding_set_destination
@ 2011-10-30 21:38 Dan Nicolaescu
  2011-11-07  2:38 ` Kenichi Handa
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Nicolaescu @ 2011-10-30 21:38 UTC (permalink / raw)
  To: 9910


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.






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#9910: valgrind warning in coding.c:coding_set_destination
  2011-10-30 21:38 bug#9910: valgrind warning in coding.c:coding_set_destination Dan Nicolaescu
@ 2011-11-07  2:38 ` Kenichi Handa
  2011-11-07  4:28   ` Dan Nicolaescu
  0 siblings, 1 reply; 3+ messages in thread
From: Kenichi Handa @ 2011-11-07  2:38 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 9910

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

---
Kenichi Handa
handa@m17n.org






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#9910: valgrind warning in coding.c:coding_set_destination
  2011-11-07  2:38 ` Kenichi Handa
@ 2011-11-07  4:28   ` Dan Nicolaescu
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Nicolaescu @ 2011-11-07  4:28 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 9910-done, 9912-done, 9911-done

Kenichi Handa <handa@m17n.org> writes:

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-07  4:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-30 21:38 bug#9910: valgrind warning in coding.c:coding_set_destination Dan Nicolaescu
2011-11-07  2:38 ` Kenichi Handa
2011-11-07  4:28   ` Dan Nicolaescu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).