Comments (4)
Interesting warning with slightly different repro:
% head a.c b.c
==> a.c <==
int CCC;
int *zoo() {
return &CCC;
}
==> b.c <==
#include <stdio.h>
extern int CCC;
extern int *zoo();
int main(int argc, char** argv) {
printf("main %p\n", &CCC);
printf("lib %p\n", zoo());
}
% ./my_clang -O2 a.c -fasan -c -fPIC && gcc -shared a.o -o a.so && gcc -c b.c
&& ./my_clang++ -fasan -O2 b.o a.so -Wl,-rpath=. && ./a.out
./a.out: Symbol `CCC' causes overflow in R_X86_64_PC32 relocation
main 0x2829c40
lib 0x7fd102829c40
Original comment by [email protected]
on 6 Oct 2011 at 3:49
from address-sanitizer.
GNU ld gives even more interesting warning:
/usr/bin/ld: a.o: relocation R_X86_64_PC32 against symbol `CCC' can not be used
when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
Original comment by [email protected]
on 6 Oct 2011 at 7:53
from address-sanitizer.
GNU ld gives even more interesting warning:
/usr/bin/ld: a.o: relocation R_X86_64_PC32 against symbol `CCC' can not be used
when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
Original comment by [email protected]
on 6 Oct 2011 at 8:09
from address-sanitizer.
fixed by r849.
This was caused by http://llvm.org/bugs/show_bug.cgi?id=11081
The fix is to not use GLobalAlias at all (we don't seem to need it anyway)
Original comment by [email protected]
on 6 Oct 2011 at 10:00
- Changed state: Fixed
from address-sanitizer.
Related Issues (20)
- ASan instrumentation should work with -O0 HOT 6
- need to instrument thread-local globals HOT 1
- Clang+ASan incorrectly handles exceptions. HOT 3
- warn on missing blacklist, better errmsg HOT 2
- [deleted issue]
- symbolize stack traces using code from lldb HOT 17
- Blacklist regexp errors silently lead to blacklist not working HOT 1
- double-free / invalid-free errors should use Report instead of Printf HOT 2
- asan false positives caused by dlcose HOT 1
- Issue with -faddress-sanitizer in combination with -Os/-O2 HOT 6
- ASan unittest (32-bit) fail to link with fresh googletest HOT 4
- mach_override may conflict with that in the client programs HOT 1
- _Unwind_Backtrace cannot unwind past wrap___cxa_throw on Mac HOT 3
- slow asan start-up on Mac 64-bit HOT 23
- Add -C option to addr2line to de-mangle names HOT 1
- get rid of sysinfo/sysinfo.cc HOT 2
- CHECK fails on linux and program doesn't launch HOT 14
- clang and clang++ behave differently on a small OOB test HOT 4
- Deal with ASLR on Mac OS HOT 8
- can't static link against gflags HOT 1
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.