# Utf8-mac: Conditional jump or move depends on uninitialised value(s)

**URL:** <https://www.ruby-forum.com/t/utf8-mac-conditional-jump-or-move-depends-on-uninitialised-value-s/182499>\
**Category:** Development\
**Created:** [January 29, 2010, 12:51am UTC](https://www.ruby-forum.com/t/utf8-mac-conditional-jump-or-move-depends-on-uninitialised-value-s/182499 "2010-01-29T00:51:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanaka\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Post date:** [January 29, 2010, 12:51am UTC](https://www.ruby-forum.com/t/utf8-mac-conditional-jump-or-move-depends-on-uninitialised-value-s/182499/1 "2010-01-29T00:51:01Z")

</div>

“\u05DB\u05BF”.encode(“UTF-8”, “UTF8-MAC”)  
e$B$H$9$k$HJQ$JCM$r85$K\>r7oJ,4te(B  
e$B$7$F$$$k$h$&$J$s$G$9$,!"$$$$$s$G$7$g$&$+!#e(B

% valgrind ./ruby -ve ‘"\u05DB\u05BF".encode(“UTF-8”, “UTF8-MAC”)’  
==10637== Memcheck, a memory error detector.  
==10637== Copyright © 2002-2007, and GNU GPL’d, by Julian Seward et  
al.  
==10637== Using LibVEX rev 1854, a library for dynamic binary  
translation.  
==10637== Copyright © 2004-2007, and GNU GPL’d, by OpenWorks LLP.  
==10637== Using valgrind-3.3.1-Debian, a dynamic binary  
instrumentation framework.  
==10637== Copyright © 2000-2007, and GNU GPL’d, by Julian Seward et  
al.  
==10637== For more details, rerun with: -v  
==10637==  
ruby 1.9.2dev (2010-01-28 trunk 26458) [i686-linux]  
==10637== Conditional jump or move depends on uninitialised value(s)  
==10637== at 0x485889D: buf\_shift\_char (utf8\_mac.c:10691)  
==10637== by 0x4858BE4: buf\_apply (utf8\_mac.c:10763)  
==10637== by 0x4858C70: from\_utf8\_mac\_finish (utf8\_mac.c:10787)  
==10637== by 0x811952E: transcode\_restartable0 (transcode.c:725)  
==10637== by 0x8119960: transcode\_restartable (transcode.c:771)  
==10637== by 0x8119A9C: rb\_transcoding\_convert (transcode.c:807)  
==10637== by 0x811A4DF: trans\_sweep (transcode.c:1143)  
==10637== by 0x811A71A: rb\_trans\_conv (transcode.c:1235)  
==10637== by 0x811AD1F: rb\_econv\_convert0 (transcode.c:1354)  
==10637== by 0x811B068: rb\_econv\_convert (transcode.c:1462)  
==10637== by 0x811CDFE: transcode\_loop (transcode.c:2268)  
==10637== by 0x811D725: str\_transcode0 (transcode.c:2609)  
==10637==  
==10637== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 31 from  
1)  
==10637== malloc/free: in use at exit: 685,265 bytes in 14,651 blocks.  
==10637== malloc/free: 15,992 allocs, 1,341 frees, 1,726,147 bytes  
allocated.  
==10637== For counts of detected errors, rerun with: -v  
==10637== searching for pointers to 14,651 not-freed blocks.  
==10637== checked 455,964 bytes.  
==10637==  
==10637== LEAK SUMMARY:  
==10637== definitely lost: 533,012 bytes in 9,815 blocks.  
==10637== possibly lost: 4,099 bytes in 1 blocks.  
==10637== still reachable: 148,154 bytes in 4,835 blocks.  
==10637== suppressed: 0 bytes in 0 blocks.  
==10637== Rerun with --leak-check=full to see details of leaked memory.
