URL: <http://savannah.gnu.org/bugs/?48384>
Summary: Memory error in desktop_parse Project: GNU gettext Submitted by: None Submitted on: Sun 03 Jul 2016 08:25:00 AM UTC Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: I have an issue that looks somewhat similar to http://savannah.gnu.org/bugs/?47991. I get random "invalid multibyte character" on a desktop file (https://git.gnome.org/browse/shotwell/tree/misc/shotwell.desktop.in.in) while trying to update the pot file in shotwell. Valgrind shows some invalid reads in desktop_parse: ==13704== Invalid read of size 1 ==13704== at 0x4C30F62: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==13704== by 0x4E72A48: desktop_unescape_string (read-desktop.c:580) ==13704== by 0x42B7DE: extract_desktop_handle_pair (x-desktop.c:126) ==13704== by 0x4E726C6: desktop_parse (read-desktop.c:504) ==13704== by 0x42B8E1: extract_desktop (x-desktop.c:189) ==13704== by 0x406DEF: extract_from_file (xgettext.c:2253) ==13704== by 0x4052F4: main (xgettext.c:987) ==13704== Address 0x9c540d9 is 9 bytes inside a block of size 200 free'd ==13704== at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==13704== by 0x50AF76D: xrealloc (xmalloc.c:125) ==13704== by 0x4E72675: desktop_lex (read-desktop.c:437) ==13704== by 0x4E72675: desktop_parse (read-desktop.c:492) ==13704== by 0x42B8E1: extract_desktop (x-desktop.c:189) ==13704== by 0x406DEF: extract_from_file (xgettext.c:2253) ==13704== by 0x4052F4: main (xgettext.c:987) ==13704== Block was alloc'd at ==13704== at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==13704== by 0x50AF76D: xrealloc (xmalloc.c:125) ==13704== by 0x4E7279E: desktop_lex (read-desktop.c:302) ==13704== by 0x4E7279E: desktop_parse (read-desktop.c:492) ==13704== by 0x42B8E1: extract_desktop (x-desktop.c:189) ==13704== by 0x406DEF: extract_from_file (xgettext.c:2253) ==13704== by 0x4052F4: main (xgettext.c:987) ==13704== ==13704== Invalid read of size 1 ==13704== at 0x4C30F74: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==13704== by 0x4E72A48: desktop_unescape_string (read-desktop.c:580) ==13704== by 0x42B7DE: extract_desktop_handle_pair (x-desktop.c:126) ==13704== by 0x4E726C6: desktop_parse (read-desktop.c:504) ==13704== by 0x42B8E1: extract_desktop (x-desktop.c:189) ==13704== by 0x406DEF: extract_from_file (xgettext.c:2253) ==13704== by 0x4052F4: main (xgettext.c:987) ==13704== Address 0x9c540da is 10 bytes inside a block of size 200 free'd ==13704== at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==13704== by 0x50AF76D: xrealloc (xmalloc.c:125) ==13704== by 0x4E72675: desktop_lex (read-desktop.c:437) ==13704== by 0x4E72675: desktop_parse (read-desktop.c:492) ==13704== by 0x42B8E1: extract_desktop (x-desktop.c:189) ==13704== by 0x406DEF: extract_from_file (xgettext.c:2253) ==13704== by 0x4052F4: main (xgettext.c:987) ==13704== Block was alloc'd at ==13704== at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==13704== by 0x50AF76D: xrealloc (xmalloc.c:125) ==13704== by 0x4E7279E: desktop_lex (read-desktop.c:302) ==13704== by 0x4E7279E: desktop_parse (read-desktop.c:492) ==13704== by 0x42B8E1: extract_desktop (x-desktop.c:189) ==13704== by 0x406DEF: extract_from_file (xgettext.c:2253) ==13704== by 0x4052F4: main (xgettext.c:987) ==13704== ==13704== Invalid read of size 1 ==13704== at 0x4E72A52: desktop_unescape_string (read-desktop.c:583) ==13704== by 0x42B7DE: extract_desktop_handle_pair (x-desktop.c:126) ==13704== by 0x4E726C6: desktop_parse (read-desktop.c:504) ==13704== by 0x42B8E1: extract_desktop (x-desktop.c:189) ==13704== by 0x406DEF: extract_from_file (xgettext.c:2253) ==13704== by 0x4052F4: main (xgettext.c:987) ==13704== Address 0x9c540d9 is 9 bytes inside a block of size 200 free'd ==13704== at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==13704== by 0x50AF76D: xrealloc (xmalloc.c:125) ==13704== by 0x4E72675: desktop_lex (read-desktop.c:437) ==13704== by 0x4E72675: desktop_parse (read-desktop.c:492) ==13704== by 0x42B8E1: extract_desktop (x-desktop.c:189) ==13704== by 0x406DEF: extract_from_file (xgettext.c:2253) ==13704== by 0x4052F4: main (xgettext.c:987) ==13704== Block was alloc'd at ==13704== at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==13704== by 0x50AF76D: xrealloc (xmalloc.c:125) ==13704== by 0x4E7279E: desktop_lex (read-desktop.c:302) ==13704== by 0x4E7279E: desktop_parse (read-desktop.c:492) ==13704== by 0x42B8E1: extract_desktop (x-desktop.c:189) ==13704== by 0x406DEF: extract_from_file (xgettext.c:2253) ==13704== by 0x4052F4: main (xgettext.c:987) ==13704== ==13704== Invalid read of size 1 ==13704== at 0x4E72A6D: desktop_unescape_string (read-desktop.c:583) ==13704== by 0x42B7DE: extract_desktop_handle_pair (x-desktop.c:126) ==13704== by 0x4E726C6: desktop_parse (read-desktop.c:504) ==13704== by 0x42B8E1: extract_desktop (x-desktop.c:189) ==13704== by 0x406DEF: extract_from_file (xgettext.c:2253) ==13704== by 0x4052F4: main (xgettext.c:987) ==13704== Address 0x9c540da is 10 bytes inside a block of size 200 free'd ==13704== at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==13704== by 0x50AF76D: xrealloc (xmalloc.c:125) ==13704== by 0x4E72675: desktop_lex (read-desktop.c:437) ==13704== by 0x4E72675: desktop_parse (read-desktop.c:492) ==13704== by 0x42B8E1: extract_desktop (x-desktop.c:189) ==13704== by 0x406DEF: extract_from_file (xgettext.c:2253) ==13704== by 0x4052F4: main (xgettext.c:987) ==13704== Block was alloc'd at ==13704== at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==13704== by 0x50AF76D: xrealloc (xmalloc.c:125) ==13704== by 0x4E7279E: desktop_lex (read-desktop.c:302) ==13704== by 0x4E7279E: desktop_parse (read-desktop.c:492) ==13704== by 0x42B8E1: extract_desktop (x-desktop.c:189) ==13704== by 0x406DEF: extract_from_file (xgettext.c:2253) ==13704== by 0x4052F4: main (xgettext.c:987) = _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?48384> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/