Comments (7)
Note that GCC sometimes optimizes variables in frontend regardless of
optimization level.
Original comment by [email protected]
on 22 May 2015 at 6:35
from address-sanitizer.
But why '-fsanitize=address' changes optimizations?
It's possible that it's something with gcc internals, but ever since I'm
working on pretty big C89 project compiled on gcc-s 2.95.3-5.1 I've *never*
encountered '<optimized out>' without '-O' switch, especially with a '-g' one…
That variable should not be optimized out since it's passed around and written
into. Any combination of '-O' and '-g' switches doesn't stop it from
„disappearing”, also making the variable volatile (!). Only disabling ASAN.
Original comment by [email protected]
on 22 May 2015 at 7:07
from address-sanitizer.
Ah, sorry, I thought you meant t. I've check compiler dumps with
-fdump-tree-all and it looks like d is preserved by ASan:
$ cat test.c.169t.optimized
...
;; Function main (main, funcdef_no=3, decl_uid=2584, symbol_order=3)
main ()
{
<bb 2>:
d = 4;
t = "";
fun_wr (&d);
Perhaps GCC has some problem when generating debuginfo? Could you file a bug in
GCC bugzilla?
Original comment by [email protected]
on 22 May 2015 at 7:49
from address-sanitizer.
Already did. Year ago :-(
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61071
I don't think it's a problem with debuginfo, since decreasing size of t by one
makes printing the d variable work again.
Original comment by [email protected]
on 22 May 2015 at 8:01
from address-sanitizer.
Does this work with fresh clang?
I afraid that this is gcc-specific and there is little we can do on asan side.
Original comment by [email protected]
on 22 May 2015 at 5:44
from address-sanitizer.
> Does this work with fresh clang?
Yeah, clang produces debugable binary.
clang version 3.6.0 (tags/RELEASE_360/final)
> I afraid that this is gcc-specific and there is little we can do on asan
side.
I understand. Thanks for your time, though.
Original comment by [email protected]
on 25 May 2015 at 5:18
from address-sanitizer.
Adding Project:AddressSanitizer as part of GitHub migration.
Original comment by [email protected]
on 30 Jul 2015 at 9:06
- Added labels: ProjectAddressSanitizer
from address-sanitizer.
Related Issues (20)
- No redzone created before first global HOT 7
- Avoid remounting system partition on Android HOT 1
- Whitespace difference between asan and msan outputs HOT 4
- JNI-based app fails with shadow memory range interleaves with existing memory mapping after ASan instrumentation HOT 14
- Wrong base address calculation for stripped Android libraries HOT 4
- ASan shared runtime library on Android re-exports the entire libgcc interface HOT 2
- sigsegv in basic block tracer HOT 3
- AddressSanitizer: while reporting a bug found another one. Ignoring. HOT 3
- [android] system property access from native code is going away HOT 2
- Link libasan with -z interpose on Linux HOT 3
- ASan is unable to link TLS arrays HOT 3
- pointer not owned error when calling malloc_usable_size() on array of structs with destructors HOT 4
- Support Android in asan_symbolize HOT 3
- thread_stats.malloced_by_size[class_id] overflow in asan_allocator.cc HOT 4
- Crash on ODR between instrumented and non-instrumented libraries HOT 2
- LSan doesn't work with empty suppressions list HOT 6
- Improve wild-free detection HOT 1
- Please tell us where you are moving due to Google Code shutdown HOT 3
- -fsanitize=address should probably imply -Bsymbolic HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from address-sanitizer.