[Bug sanitizer/81068] Sanitizer memory leak in codecvt_utf8

2017-09-20 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81068 --- Comment #8 from Jonathan Wakely --- If the relevant libstdc++ source file is instrumented there are no errors: tmp$ g++ -fsanitize=address,undefined conv.cc tmp$ ./a.out /home/jwakely/gcc/8/include/c++/8.0.0/bits/locale_conv.h:68:48: runti

[Bug sanitizer/81068] Sanitizer memory leak in codecvt_utf8

2017-09-19 Thread piotr.stachura at delphi dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81068 --- Comment #7 from Piotr Stachura --- Jonathan, you are right. In sample code, end of string should be input_data[8]. With this correction I have this same behavior on both systems that I use (correct compilation and execution without sanitizer

[Bug sanitizer/81068] Sanitizer memory leak in codecvt_utf8

2017-09-19 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81068 --- Comment #6 from Jonathan Wakely --- If you use &input_data[7] then you do not have valid UTF-8 input, because it ends with an incomplete multibyte character, "\xCD", instead of "\CD\x8B"

[Bug sanitizer/81068] Sanitizer memory leak in codecvt_utf8

2017-09-19 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81068 Jonathan Wakely changed: What|Removed |Added Status|WAITING |UNCONFIRMED Ever confirmed|1

[Bug sanitizer/81068] Sanitizer memory leak in codecvt_utf8

2017-09-19 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81068 --- Comment #4 from Jonathan Wakely --- The difference in results isn't very relevant. I'm pretty sure the reason for the sanitizer errors is that libstdc++.so isn't instrumented by the sanitizers. If you build libstdc++.so with UBsan you wouldn'

[Bug sanitizer/81068] Sanitizer memory leak in codecvt_utf8

2017-09-19 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81068 Martin Liška changed: What|Removed |Added CC||redi at gcc dot gnu.org --- Comment #3 fr

[Bug sanitizer/81068] Sanitizer memory leak in codecvt_utf8

2017-09-19 Thread piotr.stachura at delphi dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81068 --- Comment #2 from Piotr Stachura --- I have to check it deeper. I have 2 systems - one gentoo and one Ubuntu. On Ubuntu, code is correct (as I posted in bug report). When I compile this same code on gentoo (gcc-5.4.0 and gcc-7.2.0) I have this

[Bug sanitizer/81068] Sanitizer memory leak in codecvt_utf8

2017-09-14 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81068 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|