https://bugzilla.suse.com/show_bug.cgi?id=1227316 https://bugzilla.suse.com/show_bug.cgi?id=1227316#c1 Stanislav Brabec <sbrabec@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |IN_PROGRESS --- Comment #1 from Stanislav Brabec <sbrabec@suse.com> --- Breakpoint 5, message_list_header_list (mlp=<optimized out>) at msgl-header.c:386 386 char * msgid = (char *)XNMALLOC (((enh - h) + 1), char); 5: enh = 0x5555555622ef " 8bit\nPlural-Forms: nplurals=2; plural=(n!=1);\n\n" 6: h = 0x5555555622d5 "Content-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n!=1);\n\n" 7: ((enh - h) + 1) = 27 (gdb) Continuing. Breakpoint 5, message_list_header_list (mlp=<optimized out>) at msgl-header.c:386 386 char * msgid = (char *)XNMALLOC (((enh - h) + 1), char); 5: enh = 0x555555562302 " nplurals=2; plural=(n!=1);\n\n" 6: h = 0x5555555622f5 "Plural-Forms: nplurals=2; plural=(n!=1);\n\n" 7: ((enh - h) + 1) = 14 (gdb) n 387 memcpy (msgid, h, enh - h); 5: enh = 0x555555562302 " nplurals=2; plural=(n!=1);\n\n" 6: h = 0x5555555622f5 "Plural-Forms: nplurals=2; plural=(n!=1);\n\n" 7: ((enh - h) + 1) = 14 (gdb) 389 (msgid)[enh-h] = '\0'; 5: enh = 0x555555562302 " nplurals=2; plural=(n!=1);\n\n" 6: h = <optimized out> 7: ((enh - h) + 1) = <error: value has been optimized out> (gdb) 392 enh = strchr (h, '\n'); 5: enh = 0x555555562302 " nplurals=2; plural=(n!=1);\n\n" 6: h = 0x555555562303 "nplurals=2; plural=(n!=1);\n\n" 7: ((enh - h) + 1) = 0 (gdb) 393 if (enh != NULL) 5: enh = 0x55555556231d "\n\n" 6: h = 0x555555562303 "nplurals=2; plural=(n!=1);\n\n" 7: ((enh - h) + 1) = 27 (gdb) 395 char * msgstr = (char *)XNMALLOC (((enh - h) + 1), char); 5: enh = 0x55555556231d "\n\n" 6: h = 0x555555562303 "nplurals=2; plural=(n!=1);\n\n" 7: ((enh - h) + 1) = 27 (gdb) 396 memcpy (msgstr, h, enh - h); 5: enh = 0x55555556231d "\n\n" 6: h = 0x555555562303 "nplurals=2; plural=(n!=1);\n\n" 7: ((enh - h) + 1) = 27 (gdb) 29 return __builtin___memcpy_chk (__dest, __src, __len, 5: enh = 0x55555556231d "\n\n" 6: h = 0x555555562303 "nplurals=2; plural=(n!=1);\n\n" 7: ((enh - h) + 1) = 27 (gdb) 396 memcpy (msgstr, h, enh - h); 5: enh = 0x55555556231d "\n\n" 6: h = 0x555555562303 "nplurals=2; plural=(n!=1);\n\n" 7: ((enh - h) + 1) = 27 (gdb) 398 msgstr[enh-h] = '\0'; 5: enh = 0x55555556231d "\n\n" 6: h = <optimized out> 7: ((enh - h) + 1) = <error: value has been optimized out> (gdb) 399 lex_pos_ty pos = {NULL, ctr++}; 5: enh = 0x55555556231d "\n\n" 6: h = <optimized out> 7: ((enh - h) + 1) = <error: value has been optimized out> (gdb) 400 message_list_append (header, message_alloc (NULL, msgid, NULL, msgstr, enh - h, &pos)); 5: enh = 0x55555556231d "\n\n" 6: h = <optimized out> 7: ((enh - h) + 1) = <error: value has been optimized out> (gdb) 382 while (*h != '\0') 6: h = 0x55555556231e "\n" (gdb) 384 char *enh = strchr (h, ':'); 5: enh = <optimized out> 6: h = 0x55555556231e "\n" 7: ((enh - h) + 1) = <error: value has been optimized out> (gdb) Breakpoint 5, message_list_header_list (mlp=<optimized out>) at msgl-header.c:386 386 char * msgid = (char *)XNMALLOC (((enh - h) + 1), char); 5: enh = 0x1 <error: Cannot access memory at address 0x1> 6: h = 0x55555556231e "\n" 7: ((enh - h) + 1) = -93824992289564 And in the next moment, this will be called: XNMALLOC (-93824992289564, char) And it fails. -- You are receiving this mail because: You are on the CC list for the bug.