ramosian-glider / memory-sanitizer

Automatically exported from code.google.com/p/memory-sanitizer
0 stars 0 forks source link

std::string last symbol #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. clang++ -std=c++11 -fsanitize=memory -fsanitize-memory-track-origins -g 
foo.cpp -o prog
2. ./prog

What is the expected output?

Expected no errors.

What do you see instead?

Error in line 11 about uninitialized value.

What version of the product are you using?

> /usr/bin/clang++ --version
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix

On what operating system?

> uname -a
Linux ubuntu 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 
x86_64 x86_64 x86_64 GNU/Linux

Please provide any additional information below.

Test file foo.cpp attached

Original issue reported on code.google.com by r4Rtw...@gmail.com on 22 Jun 2014 at 11:07

Attachments:

GoogleCodeExporter commented 9 years ago
http://clang.llvm.org/docs/MemorySanitizer.html#id9

String memory is initialized in libstdc++. You need to build with instrumented 
libstdc++, or (probably easier) libc++.

Original comment by euge...@google.com on 23 Jun 2014 at 11:04

GoogleCodeExporter commented 9 years ago
Adding Project:MemorySanitizer as part of GitHub migration.

Original comment by gli...@google.com on 30 Jul 2015 at 9:22