Displaying 20 results from an estimated 23 matches for "insertpoolchecks".
2011 Jan 23
1
[LLVMdev] Pointers in Load and Store
...what is it?
>
> The problem is simple: you're looking at the wrong source file.
> :)
>
> More specifically, you're looking at the very antiquated static array bounds
> checking pass (it hasn't compiled in several years now). The file you want
> to look at is in lib/InsertPoolChecks/insert.cpp. This file contains the
> InsertPoolChecks pass which, in mainline SAFECode, is responsible for
> inserting array bounds checks and indirect function call checks. In
> particular, you want to look at the addGetElementPtrChecks() method.
>
> As for Constant Expression GEP...
2011 Jan 22
0
[LLVMdev] Pointers in Load and Store
...must be doing something wrong, what is it?
The problem is simple: you're looking at the wrong source file.
:)
More specifically, you're looking at the very antiquated static array
bounds checking pass (it hasn't compiled in several years now). The
file you want to look at is in lib/InsertPoolChecks/insert.cpp. This
file contains the InsertPoolChecks pass which, in mainline SAFECode, is
responsible for inserting array bounds checks and indirect function call
checks. In particular, you want to look at the addGetElementPtrChecks()
method.
As for Constant Expression GEPs, you want to look...
2015 Feb 27
2
[LLVMdev] Walking thru CallGraph bottom up
...hat function, etc.
> >
> >> or given the Module I have to call the CallGraph directly?
> >> Is there an example out there? I can?t find anything.
> >
> > It uses the DSA CallGraph pass, but
> http://llvm.org/viewvc/llvm-project/safecode/branches/release_32/lib/InsertPoolChecks/CFIChecks.cpp?revision=189030&view=markup
> <
> http://llvm.org/viewvc/llvm-project/safecode/branches/release_32/lib/InsertPoolChecks/CFIChecks.cpp?revision=189030&view=markup>
> might provide a decent example.
> >
> > Regards,
> >
> > John Criswell
&g...
2015 Feb 27
0
[LLVMdev] Walking thru CallGraph bottom up
...>
> >> or given the Module I have to call the CallGraph directly?
> >> Is there an example out there? I can?t find anything.
> >
> > It uses the DSA CallGraph pass, but
> http://llvm.org/viewvc/llvm-project/safecode/branches/release_32/lib/InsertPoolChecks/CFIChecks.cpp?revision=189030&view=markup
> <http://llvm.org/viewvc/llvm-project/safecode/branches/release_32/lib/InsertPoolChecks/CFIChecks.cpp?revision=189030&view=markup>
> might provide a decent example.
> >
> > Regards,
> >
> >...
2011 Jan 22
2
[LLVMdev] Pointers in Load and Store
John,
I have looked at the SAFECode and thought following sould work
if (isa<Constant>(I.getOperand(0)))
{ Out << "*** operand 0 is a constant ******";
if (Instruction *operandI = dyn_cast<Instruction>(I.getOperand(0)))
{ Out << "********operand is an instruction ****";
if (GetElementPtrInst *gepI =
2015 Feb 25
0
[LLVMdev] Walking thru CallGraph bottom up
...hen repeat the procedures for
functions calling that function, etc.
> or given the Module I have to call the CallGraph directly?
> Is there an example out there? I can’t find anything.
It uses the DSA CallGraph pass, but
http://llvm.org/viewvc/llvm-project/safecode/branches/release_32/lib/InsertPoolChecks/CFIChecks.cpp?revision=189030&view=markup
might provide a decent example.
Regards,
John Criswell
>
> Thanks.
> Simone
>
>> On Feb 24, 2015, at 13:29, John Criswell <jtcriswel at gmail.com> wrote:
>>
>> On 2/24/15 2:27 PM, Simone Atzeni wrote:
>>>...
2015 Feb 25
2
[LLVMdev] Walking thru CallGraph bottom up
Thanks John.
I guess I will use a ModulePass, so when I am implementing the “runOnModule” function,
do I have to loop through all the functions, for each functions all the BasicBlocks and for each BasicBlock all the instructions
or given the Module I have to call the CallGraph directly?
Is there an example out there? I can’t find anything.
Thanks.
Simone
> On Feb 24, 2015, at 13:29, John
2011 Sep 29
0
[LLVMdev] Instrumenting C/C++ programs
...n, I looked at an example of a pass that adds run-time checks to LLVM IR loads and stores, the SAFECode's load/store instrumentation pass (http://llvm.org/viewvc/llvm-project/safecode/trunk/include/safecode/LoadStoreChecks.h?view=markup and http://llvm.org/viewvc/llvm-project/safecode/trunk/lib/InsertPoolChecks/LoadStoreChecks.cpp?view=markup). But I couldn't figure out how to run this pass. Please give me steps how to run this pass on some program say the above Account.cpp.
>
> Thanks,
> Himanshu
>
>
>
>
> On Fri, Sep 23, 2011 at 11:13 PM, John Criswell <criswell at il...
2011 Sep 29
2
[LLVMdev] Instrumenting C/C++ programs
...ime checks to LLVM IR loads
>>>> and stores, the SAFECode's load/store instrumentation pass (
>>>> http://llvm.org/viewvc/llvm-project/safecode/trunk/include/safecode/LoadStoreChecks.h?view=markupand
>>>> http://llvm.org/viewvc/llvm-project/safecode/trunk/lib/InsertPoolChecks/LoadStoreChecks.cpp?view=markup).
>>>> But I couldn't figure out how to run this pass. Please give me steps how to
>>>> run this pass on some program say the above Account.cpp.
>>>>
>>>> Thanks,
>>>> Himanshu
>>>>
>>&...
2011 Nov 17
1
[LLVMdev] Instrumenting C/C++ programs
...://llvm.org/viewvc/llvm-project/safecode/trunk/include/safecode/LoadStoreChecks.h?view=markup>
>>>>> http://llvm.org/viewvc/llvm-project/safecode/trunk/include/safecode/LoadStoreChecks.h?view=markupand
>>>>> <http://llvm.org/viewvc/llvm-project/safecode/trunk/lib/InsertPoolChecks/LoadStoreChecks.cpp?view=markup>
>>>>> http://llvm.org/viewvc/llvm-project/safecode/trunk/lib/InsertPoolChecks/LoadStoreChecks.cpp?view=markup).
>>>>> But I couldn't figure out how to run this pass. Please give me steps how to
>>>>> run this pass...
2010 Dec 07
2
[LLVMdev] own source transformation
Hi,
I'm a student who is going to make a countermeasure for dangling pointers in c for his thesis.
I need to make my source transformation using llvm. Nobody in my university already used LLVM.
I already read a some documentation about llvm but i'm still lost.
Do there exist some " examples/Tutorials" for making small source transformations.
Or is there somebody who can help
2011 Sep 28
2
[LLVMdev] Instrumenting C/C++ programs
...f a pass that adds run-time checks to LLVM IR loads
>> and stores, the SAFECode's load/store instrumentation pass (
>> http://llvm.org/viewvc/llvm-project/safecode/trunk/include/safecode/LoadStoreChecks.h?view=markupand
>> http://llvm.org/viewvc/llvm-project/safecode/trunk/lib/InsertPoolChecks/LoadStoreChecks.cpp?view=markup).
>> But I couldn't figure out how to run this pass. Please give me steps how to
>> run this pass on some program say the above Account.cpp.
>>
>> Thanks,
>> Himanshu
>>
>>
>>
>>
>> On Fri, Sep 23, 2011...
2011 Sep 27
1
[LLVMdev] Instrumenting C/C++ programs
...n, I
looked at an example of a pass that adds run-time checks to LLVM IR loads
and stores, the SAFECode's load/store instrumentation pass (
http://llvm.org/viewvc/llvm-project/safecode/trunk/include/safecode/LoadStoreChecks.h?view=markupand
http://llvm.org/viewvc/llvm-project/safecode/trunk/lib/InsertPoolChecks/LoadStoreChecks.cpp?view=markup).
But I couldn't figure out how to run this pass. Please give me steps how to
run this pass on some program say the above Account.cpp.
Thanks,
Himanshu
On Fri, Sep 23, 2011 at 11:13 PM, John Criswell <criswell at illinois.edu>wrote:
> On 9/23/11 1...
2011 Sep 23
3
[LLVMdev] Instrumenting C/C++ programs
I just read that LLVM project could be used to do static analysis on C/C++
codes using the analyzer Clang which the front end of LLVM. I wanted to know
if it is possible to extract all the accesses to memory(variables, local as
well as global) in the source code using LLVM.
Is there any inbuilt library present in LLVM which I could use to extract
this information. If not please suggest me how to
2011 Sep 29
0
[LLVMdev] Instrumenting C/C++ programs
...t adds run-time checks to LLVM IR loads
>>> and stores, the SAFECode's load/store instrumentation pass (
>>> http://llvm.org/viewvc/llvm-project/safecode/trunk/include/safecode/LoadStoreChecks.h?view=markupand
>>> http://llvm.org/viewvc/llvm-project/safecode/trunk/lib/InsertPoolChecks/LoadStoreChecks.cpp?view=markup).
>>> But I couldn't figure out how to run this pass. Please give me steps how to
>>> run this pass on some program say the above Account.cpp.
>>>
>>> Thanks,
>>> Himanshu
>>>
>>>
>>>
>>...
2011 Sep 28
0
[LLVMdev] Instrumenting C/C++ programs
...an example of a pass that adds run-time checks to LLVM IR loads
> and stores, the SAFECode's load/store instrumentation pass (
> http://llvm.org/viewvc/llvm-project/safecode/trunk/include/safecode/LoadStoreChecks.h?view=markupand
> http://llvm.org/viewvc/llvm-project/safecode/trunk/lib/InsertPoolChecks/LoadStoreChecks.cpp?view=markup).
> But I couldn't figure out how to run this pass. Please give me steps how to
> run this pass on some program say the above Account.cpp.
>
> Thanks,
> Himanshu
>
>
>
>
> On Fri, Sep 23, 2011 at 11:13 PM, John Criswell <criswell...
2011 Apr 07
1
[LLVMdev] LLVM Tutorials
Hi,
Could anyone point me to some simple examples/tutorials for writing
instrumentation transform passes. Essentially adding instructions to basic
blocks, such as print statements, load, add, store. I have tried going
through profiling transforms, and was wondering if there is any better
documented tutorial etc ?
Thanks
Nipun
-------------- next part --------------
An HTML attachment was
2011 Nov 03
0
[LLVMdev] Instrument examples
...LLVM transform passes.
As you start coding, you'll find the doxygen docs (also on that web
page) extremely valuable.
As for examples, you might want to take a look at some of the passes in
the SAFECode project (http://sva.cs.illinois.edu). The load/store
instrumentation pass (safecode/lib/InsertPoolChecks/LoadStoreChecks.cpp)
is a very simple example of a pass that instruments every load and
store. Modifying that code to instrument function calls and basic
blocks should be straightforward.
There are, of course, numerous examples in LLVM itself (in
lib/Transforms), too, although I'm not sur...
2012 Nov 18
1
[LLVMdev] get size of a GlobalVariable
Hi,
How can I get the size of a global variable if I have a reference to
the corresponding llvm::GlobalVariable object? What if this variable
is an array or struct, how can I get the size of the whole variable?
Thanks in advance,
Eduardo
2011 Nov 21
1
[LLVMdev] ModulePass and Strings
Hi everybody,
I am writing an LLVM pass and I want to iterate over the whole module
(including global variables), that's why I use ModulePass instead of
FunctionPass. But I don't know how to do it. Using Module::iterator seams
to iterate only over functions. But I need to iterate over all the
Instructions in the module. How should I do such an iteration?
Also, I would like to find all the