Displaying 20 results from an estimated 600 matches similar to: "[LLVMdev] RFC: change BoundsChecking.cpp to use address-based tests"
2012 Nov 26
0
[LLVMdev] RFC: change BoundsChecking.cpp to use address-based tests
Hi Kevin,
Thanks for your interest and for your deep analysis.
Unfortunately, your approach doesn't catch all bugs and is vulnerable to an
attack.
Consider the following case:
...................... | ----- obj --- | |
end ^ ptr ^ ^ end-of-memory
The scenario is as follows:
- an object is allocated in the last page of the address space
- obj is byte
2012 Dec 04
2
[LLVMdev] RFC: change BoundsChecking.cpp to use address-based tests
Nuno,
Inspired by this email thread, I spent a bit of time today looking
through the implementation of BoundsChecking::instrument(..). Based on
my reading of prior work, it should be possible to do these checks in
two comparisons, or possibly even one if the right assumptions could be
made.
Could you provide a bit of background of the expected domains of Size
and Offset? In particular,
2012 Dec 04
0
[LLVMdev] RFC: change BoundsChecking.cpp to use address-based tests
Hi,
> Could you provide a bit of background of the expected domains of Size and
> Offset? In particular, are they signed or unsigned integers? A
> non-negative size doesn't seem to make much sense in this context, but
> depending on how it's calculated I could see it arising. Is a zero Size
> something that might arise here? I'm assuming the Offset comes from an
2012 Dec 17
3
[LLVMdev] max/min intrinsics
At Monday, December 17, 2012 2:05 PM, Nadav Rotem [mailto:nrotem at apple.com] wrote:
>This part worries me. The new min/max intrinsics will only be useful if we could pattern match cmp/select into them.
Yes, that's the obvious alternative. I don't think we have any strong opinion either way, and fcmp/select is certainly easier to implement.
--
Kevin Schoedel, Software Developer,
2012 Dec 17
0
[LLVMdev] max/min intrinsics
Maybe we can have two versions of the intrinsic function, "ordered" and "unordered", just like fcmp has [1]. Would that work ?
[1] - http://llvm.org/docs/LangRef.html#fcmp-instruction
On Dec 17, 2012, at 11:14 AM, "Schoedel, Kevin P" <kevin.p.schoedel at intel.com> wrote:
> At Monday, December 17, 2012 2:05 PM, Nadav Rotem [mailto:nrotem at apple.com]
2013 Sep 09
4
[LLVMdev] Intel Memory Protection Extensions (and types question)
Hi all,
I'm currently adding new instructions and registers to the X86 code
generator for Intel Memory Protection Extensions [1].
A class of special-purpose registers BNDx each holds 2 x 64-bit values.
The components are not individually readable or writable (except by
going through memory) but there are instructions that read only one
of the two elements. The two 64-bit values can be
2012 Dec 17
2
[LLVMdev] max/min intrinsics
On Wednesday, December 05, 2012 at 2:48 PM, Chris Lattner wrote:
> > What does the community think?
>
> It seems inevitable. For the floating point version, please make it very clear
> what the behavior of max(-0,+0) and related cases are.
The following is our current proposal for llvm.fmax/fmin.*:
[1] If exactly one argument is a NaN, the intrinsic returns the other argument.
2013 Feb 27
4
[LLVMdev] Question about intrinsic function llvm.objectsize
On Feb 27, 2013, at 4:05 AM, Nuno Lopes <nunoplopes at sapo.pt> wrote:
> Hi,
>
> Regarding the definition of object for @llvm.objectsize, it is identical to gcc's __builtin_object_size(). So it's not wrong; it's just the way it was defined to be.
>
> Regarding the BasicAA's usage of these functions, I'm unsure. It seems to me that isObjectSmallerThan()
2013 Feb 26
2
[LLVMdev] Question about intrinsic function llvm.objectsize
Hi,
In the following instruction sequence, llvm.objectsize.i64(p) returns
6 (the entire *.ll is attached to the mail).
Is this correct? Shouldn't the "object" refer to the entire block of
memory being allocated?
(char*) p = malloc(56)
llvm.objectisize.i32(p+50);
Thanks
Shuxin
This question is related to PR14988 (failure in bootstrap build with
LTO). Part of the
2013 Sep 09
2
[LLVMdev] Intel Memory Protection Extensions (and types question)
Hi,
On Monday, September 09, 2013 4:20 PM, Nadav Rotem [mailto:nrotem at apple.com] wrote:
> Thanks for working on this. We usually try really hard to avoid adding new
> types such as x86mmx. I don't know the memory-protection instruction set at
> all but I imagine that you are not expecting other LLVM optimizations to
> interact with them right ? (it looks that way from this
2014 Sep 19
2
[LLVMdev] poison and select
Today I ran into another aspect of the poison problem...
Basically, SimplifyCFG wants to take
expr1 && expr2
and flatten it into
x = expr1
y = expr2
x&y
This isn't safe when expr2 might execute UB. The consequence is that no
LLVM shift instruction is safe to speculatively execute, nor is any
nsw/nuw/exact variant, unless the operands can be proven to be in
2013 Feb 27
0
[LLVMdev] Question about intrinsic function llvm.objectsize
Hi,
Regarding the definition of object for @llvm.objectsize, it is
identical to gcc's __builtin_object_size(). So it's not wrong; it's
just the way it was defined to be.
Regarding the BasicAA's usage of these functions, I'm unsure. It
seems to me that isObjectSmallerThan() also expects the same
definition, but I didn't review the code carefully.
When you do a
2012 Feb 27
2
[LLVMdev] How to unroll loop with non-constant boundary
On Mon, Feb 27, 2012 at 9:30 AM, Benjamin Kramer
<benny.kra at googlemail.com> wrote:
>
> On 27.02.2012, at 17:13, Николай Лихогруд wrote:
>
>> Dear LLVM,
>>
>> Consider two loops with one interation -
>> First with constant lower bound, second with usual non-constant lower bound:
>>
>> int main(int argc, char ** argv)
>> {
2013 Sep 10
0
[LLVMdev] Intel Memory Protection Extensions (and types question)
Hi Kevin,
We're also interested in support for fat pointers in LLVM/clang and it would be nice to have some general infrastructure for them (we currently have a load of hacks). There are a lot of research architectures with fat pointers, and MPX is likely to be just the first of many to start hitting real silicon soon. There are a few properties that we'd ideally want to represent in
2012 Feb 27
3
[LLVMdev] How to unroll loop with non-constant boundary
Dear LLVM,
Consider two loops with one interation -
First with constant lower bound, second with usual non-constant lower
bound:
int main(int argc, char ** argv)
{
int numOfIterations= 1;
int stride=1;
int lowerBound = 1000; - 1st | int lowerBound = argc; - 2nd
int upperBound = lowerBound + (numOfIterations - 1)*stride;
int i = lowerBound;
2017 Aug 02
3
[InstCombine] Simplification sometimes only transforms but doesn't simplify instruction, causing side effect in other pass
Hi,
We recently found a testcase showing that simplifications in
instcombine sometimes change the instruction without reducing the
instruction cost, but causing problems in TwoAddressInstruction pass.
And it looks like the problem is generic and other simplification may
have the same issue. I want to get some ideas about what is the best
way to fix such kind of problem.
The testcase:
2012 Dec 17
0
[LLVMdev] max/min intrinsics
On Dec 17, 2012, at 10:50 AM, "Schoedel, Kevin P" <kevin.p.schoedel at intel.com> wrote:
> The intrinsics are not equivalent to an fcmp/select sequence.
This part worries me. The new min/max intrinsics will only be useful if we could pattern match cmp/select into them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2013 Feb 27
0
[LLVMdev] Question about intrinsic function llvm.objectsize
> In the "llvm.objectsize" context we pass an object "based on p" to getObjectSize: "p+50". In the basicaa context, we wanna know whether an access is beyond the bounds of an underlying object (undefined behavior land) so we pass the underlying object (which in your example would be the "p" returned from malloc) to the getObjectSize function.
>
> In
2013 Feb 27
0
[LLVMdev] Question about intrinsic function llvm.objectsize
Hi, Nuno and Arnold:
Thank you all for the input.
Let me coin a term, say "clique" for this discussion to avoid
unnecessary confusion.
A clique is statically or dynamically allocated type-free stretch of
memory. A "clique"
1) is maximal in the sense that a clique dose not have any
enclosing data structure that can
completely cover or, partially
2013 Sep 09
0
[LLVMdev] Intel Memory Protection Extensions (and types question)
Hi Kevin,
Thanks for working on this. We usually try really hard to avoid adding new types such as x86mmx. I don’t know the memory-protection instruction set at all but I imagine that you are not expecting other LLVM optimizations to interact with them right ? (it looks that way from this example[1]). If you are not accessing the individual components then you can use i128, or even <2 x