Axel Naumann
44481ace1e
Fix license; remove $Id$ version.
2014-01-07 11:14:04 +01:00
Vassil Vassilev
5c7a283759
Synthesizing if(DeclRefExpr) throw requires cling to be run with rtti.
...
Fix that problem by introducing an indirection - a compiled function that throws.
2013-09-11 23:11:57 +02:00
Vassil Vassilev
11dde3e83f
Silence a warning.
2013-09-11 16:35:53 +02:00
Vassil Vassilev
e92c7da7c3
Use better name.
2013-09-11 13:50:57 +02:00
Vassil Vassilev
5d88b742d2
Remove unused files.
2013-09-11 13:50:57 +02:00
Vassil Vassilev
a204e40a01
Silence warnings for unused fields.
2013-09-10 17:04:55 +02:00
Baozeng Ding
2fe19f6639
Reduce the dependence from the IR. It will be soon replaced by the AST one.
2013-09-09 15:38:51 +02:00
Baozeng Ding
69c20e16b9
Make shouldProceed C++ function.
2013-08-27 22:18:54 +02:00
Baozeng Ding
3f256225e9
Iterate over the redecl chain to find the non null attribute.
2013-08-23 21:44:53 +02:00
Vassil Vassilev
c2a0b5cece
For now we will only work/check on declarations that are not deserialized.
...
We don't want our null deref checker to deserialize the whole PCH/PCM. We should
come up with an idea to work around it.
2013-08-22 13:50:56 +02:00
Baozeng Ding
715e222957
Add support for null deref checks in indirect calls.
2013-08-21 11:34:51 +02:00
Baozeng Ding
cc877954ae
Add support for mangling: How we can check regular C++ functions.
...
Indirect calls are still an issue.
2013-08-21 11:14:55 +02:00
Baozeng Ding
2152ad4c7d
Optimize for the cases where the pointer value is known at compile-time.
2013-08-16 20:05:53 +02:00
Baozeng Ding
eca58d0ffc
Add support for the cases where the pointer is not char*.
2013-08-16 19:50:53 +02:00
Vassil Vassilev
d6b9cd9b0c
Improve style.
2013-08-15 23:17:51 +02:00
Vassil Vassilev
914c09228e
Mark test as XFAIL. Follow the cling naming convention.
2013-08-15 09:49:59 +02:00
Baozeng Ding
10602d688f
Protect the non-null taking functions like strcmp.
2013-08-14 21:05:55 +02:00
Philippe Canal
977f4c4dfc
Dtor_Deleting -> Dtor_Complete
2013-08-12 22:34:55 +02:00
Baozeng Ding
261bedbfe6
Instead of check each load and store instruction, we check the usage of the load instruction. Currently, there are four kinds of instruction that may use a load instruction as its argument: load, store, GEP and call instruction. We instrument these four kinds instruction to check there may be a null pointer dereference.
2013-08-08 17:23:53 +02:00
Vassil Vassilev
285dcca31a
Try fix cling on fedora.
2013-08-02 09:09:54 +02:00
Vassil Vassilev
9e735eb8b0
Be even more precise - c++ reference guide says that getchar is in cstdio.
2013-08-01 22:58:52 +02:00
Vassil Vassilev
469daffc65
Use some tricks to adjust the source location of the diagnostic.
2013-08-01 22:47:58 +02:00
Baozeng Ding
9189379bbf
Use isatty first, before getchar()
2013-08-01 22:47:58 +02:00
Baozeng Ding
02735d3dcf
Add source location to the null deref warning. Place the asterisks next to the type as in the rest of cling.
2013-08-01 22:47:58 +02:00
Vassil Vassilev
6910f4ed36
Fix typo.
2013-07-27 20:43:03 +02:00
Baozeng Ding
8e17b5e93e
Report the null deref warning through diagnostic engine.
2013-07-27 20:43:03 +02:00
Baozeng Ding
9ee3398603
Implement the callback that warns the user on null ptr deref.
2013-07-21 15:16:57 +02:00
Vassil Vassilev
3c101956d8
Add proper initialization.
2013-07-15 08:46:51 +02:00
Baozeng Ding
8d657b2b71
It wasn't Baozeng's fault I committed the old instead of the newest patch.
2013-07-15 08:15:53 +02:00
Baozeng Ding
e02eb39090
Add null deref ptr transformer, which instruments the llvm::IR to protect user code at the prompt accidentally dereferencing a null ptr.
...
Tests coming soon.
2013-07-14 22:27:52 +02:00