search for: memset

Displaying 20 results from an estimated 3860 matches for "memset".

2013 Sep 30
2
[LLVMdev] How to make sure llvm.memset intrinsic is not lowered into memset() call?
On Mon, Sep 30, 2013 at 7:48 PM, John Criswell <criswell at illinois.edu>wrote: > On 9/30/13 9:40 AM, Alexey Samsonov wrote: > > Hi llvmdev! > > There are cases when we want our instrumentation passes for Sanitizer > tools to insert llvm.memset.* calls (basically, we want to mark certain > region of user memory as (un)addressable by writing magic values for > "shadow" of that memory region). llvm.memset are convenient: > (1) we don't have to manually emit all these n-byte stores in a cycle. > (2) llvm.memset can...
2013 Sep 30
0
[LLVMdev] How to make sure llvm.memset intrinsic is not lowered into memset() call?
...swell <criswell at illinois.edu > <mailto:criswell at illinois.edu>> wrote: > > On 9/30/13 9:40 AM, Alexey Samsonov wrote: >> Hi llvmdev! >> >> There are cases when we want our instrumentation passes for >> Sanitizer tools to insert llvm.memset.* calls (basically, we want >> to mark certain region of user memory as (un)addressable by >> writing magic values for "shadow" of that memory region). >> llvm.memset are convenient: >> (1) we don't have to manually emit all these n-byte stores...
2013 Sep 30
2
[LLVMdev] How to make sure llvm.memset intrinsic is not lowered into memset() call?
Hi llvmdev! There are cases when we want our instrumentation passes for Sanitizer tools to insert llvm.memset.* calls (basically, we want to mark certain region of user memory as (un)addressable by writing magic values for "shadow" of that memory region). llvm.memset are convenient: (1) we don't have to manually emit all these n-byte stores in a cycle. (2) llvm.memset can be inlined as a plat...
2012 Dec 20
4
Deprecated calls to bzero() and index() found in OpenSSH 6.1p1
Hello All, In reviewing source code for OpenSSH-6.1p1, I found instances of deprecated library calls still within various source code files. Examples of deprecated calls are: bzero() (replaced with memset() which is ANSI compliant), index() (replaced with strchr() which is also ANSI compliant). In file 'auth2-jpake.c', I've replaced all the bzero() calls with the equivalent memset() calls. The patch file is below in (diff -u) format: --- auth2-jpake.c.orig 2012-12-19 17:01:52.8175281...
2012 Dec 21
0
File Attachments for previous bug report
...jpake.c.orig 2012-12-19 17:01:52.817528171 -0800 +++ auth2-jpake.c 2012-12-19 17:05:59.044554766 -0800 @@ -178,7 +178,7 @@ fatal("%s: not enough bytes for rawsalt (want %u have %u)", __func__, len, digest_len); memcpy(rawsalt, digest, len); - bzero(digest, digest_len); + memset(digest, 0, digest_len); xfree(digest); } @@ -203,10 +203,10 @@ fatal("%s: want %u", __func__, want); derive_rawsalt(user, rawsalt, sizeof(rawsalt)); - bzero(ret, sizeof(ret)); + memset(ret, 0, sizeof(ret)); for (i = 0; i < want; i++) ret[i] = pw_encode64(rawsalt[...
2013 Sep 30
0
[LLVMdev] How to make sure llvm.memset intrinsic is not lowered into memset() call?
On 9/30/13 9:40 AM, Alexey Samsonov wrote: > Hi llvmdev! > > There are cases when we want our instrumentation passes for Sanitizer > tools to insert llvm.memset.* calls (basically, we want to mark > certain region of user memory as (un)addressable by writing magic > values for "shadow" of that memory region). llvm.memset are convenient: > (1) we don't have to manually emit all these n-byte stores in a cycle. > (2) llvm.memset ca...
2018 May 21
0
DSE: Remove useless stores between malloc & memset
"memory accesses between the malloc and the memset without an expensive linear scan of the block/function" (1) do you mean just use "memoryIsNotModifiedBetween" function in DSE to check it? x = maloc(..); memset(x, ...) (2) GetUnderlyingObject would give me Value * (from malloc) ? Also another case: memset(s, 0, len); // len &gt...
2018 May 17
3
DSE: Remove useless stores between malloc & memset
Hello, I would like to find a way to do this removal properly. I found DSE and "eliminateNoopStore" can be useful for this thing. What I mean? int *test = malloc(15 * sizeof(int)); test[10] = 12; < ----- remove this store memset(test,0,sizeof(int) * 15); I already checked the function "eliminateNoopStore". Looks good, I think I would be to get the value ("A") we store to, is from malloc. Then a pointer capture analysis would be performed. These steps should not be hard. The problem: how to do the dete...
2018 May 21
2
DSE: Remove useless stores between malloc & memset
memoryIsNotModifiedBetween is precisely the sort of expensive walk we shouldn't be doing... I'm surprised it hasn't caused any serious issues yet.  Ideally, what we should be doing is using MemorySSA to find a dependency from the memset: if the closest dependency is the malloc, there aren't any stores between the memset and the malloc.  (But we aren't using MemorySSA in DSE yet; see https://reviews.llvm.org/D40480.) But yes, memoryIsNotModifiedBetween has the right meaning. -Eli On 5/21/2018 7:48 AM, Dávid Bolvanský w...
2010 May 10
2
[LLVMdev] How can I remove Intrinsic Functions during llvm-gcc compilation?
Thanks a lot for your answer. As what you said, I can not have any options to avoid generating this kind of intrinsic for byte code. Is it possible to modify gcc and ask it take all memset liked functions as a general function call? I know this solution is less performance efficient, but I would like to have it for my llvm assembly level modification works. But anyway, thanks for you help. Hao On Mon, May 10, 2010 at 6:30 AM, Duncan Sands <baldrick at free.fr> wrote: > Hi...
2018 May 22
0
DSE: Remove useless stores between malloc & memset
...<efriedma at codeaurora.org>: > memoryIsNotModifiedBetween is precisely the sort of expensive walk we > shouldn't be doing... I'm surprised it hasn't caused any serious issues > yet. Ideally, what we should be doing is using MemorySSA to find a > dependency from the memset: if the closest dependency is the malloc, there > aren't any stores between the memset and the malloc. (But we aren't using > MemorySSA in DSE yet; see https://reviews.llvm.org/D40480.) > > But yes, memoryIsNotModifiedBetween has the right meaning. > > -Eli > > >...
2011 May 28
1
[TRIVIAL PATCH next 00/15] treewide: Convert vmalloc/memset to vzalloc
Resubmittal of patches from November 2010 and a few new ones. Joe Perches (15): s390: Convert vmalloc/memset to vzalloc x86: Convert vmalloc/memset to vzalloc atm: Convert vmalloc/memset to vzalloc drbd: Convert vmalloc/memset to vzalloc char: Convert vmalloc/memset to vzalloc isdn: Convert vmalloc/memset to vzalloc md: Convert vmalloc/memset to vzalloc media: Convert vmalloc/memset to vzall...
2011 May 28
1
[TRIVIAL PATCH next 00/15] treewide: Convert vmalloc/memset to vzalloc
Resubmittal of patches from November 2010 and a few new ones. Joe Perches (15): s390: Convert vmalloc/memset to vzalloc x86: Convert vmalloc/memset to vzalloc atm: Convert vmalloc/memset to vzalloc drbd: Convert vmalloc/memset to vzalloc char: Convert vmalloc/memset to vzalloc isdn: Convert vmalloc/memset to vzalloc md: Convert vmalloc/memset to vzalloc media: Convert vmalloc/memset to vzall...
2011 May 28
1
[TRIVIAL PATCH next 00/15] treewide: Convert vmalloc/memset to vzalloc
Resubmittal of patches from November 2010 and a few new ones. Joe Perches (15): s390: Convert vmalloc/memset to vzalloc x86: Convert vmalloc/memset to vzalloc atm: Convert vmalloc/memset to vzalloc drbd: Convert vmalloc/memset to vzalloc char: Convert vmalloc/memset to vzalloc isdn: Convert vmalloc/memset to vzalloc md: Convert vmalloc/memset to vzalloc media: Convert vmalloc/memset to vzall...
2018 May 22
2
DSE: Remove useless stores between malloc & memset
...eaurora.org>: > >> memoryIsNotModifiedBetween is precisely the sort of expensive walk we >> shouldn't be doing... I'm surprised it hasn't caused any serious issues >> yet. Ideally, what we should be doing is using MemorySSA to find a >> dependency from the memset: if the closest dependency is the malloc, there >> aren't any stores between the memset and the malloc. (But we aren't using >> MemorySSA in DSE yet; see https://reviews.llvm.org/D40480.) >> >> But yes, memoryIsNotModifiedBetween has the right meaning. >> >...
2010 May 10
0
[LLVMdev] How can I remove Intrinsic Functions during llvm-gcc compilation?
SHEN Hao wrote: > Thanks a lot for your answer. > As what you said, I can not have any options to avoid generating this kind > of intrinsic for byte code. Is it possible to modify gcc and ask it take > all memset liked functions as a general function call? I know this solution > is less performance efficient, but I would like to have it for my llvm > assembly level modification works. > It's possible to write an LLVM pass that converts calls to llvm.memset() into calls to an external memse...
2020 Aug 31
2
EmitTargetCodeForMemSet & LTO issue
Hi Teresa, Thank you for the help, adding the "used" attribute worked just fine. It made me realize that the memset function is never inlined by the LTO optimization even without my implementation of the "EmitTargetCodeForMemSet" method. I supposed that the passes dealing with the memset function happen too late, is that correct? Thank you again, Romaric On Fri, Aug 28, 2020 at 5:51 PM Teresa Johnson...
2010 May 12
1
[LLVMdev] How can I remove Intrinsic Functions during llvm-gcc compilation?
...t 7:19 PM, John Criswell <criswell at uiuc.edu> wrote: > SHEN Hao wrote: >> Thanks a lot for your answer. >> As what you said, I can not have any options to avoid generating this kind >> of intrinsic for byte code. Is it possible to modify gcc and ask it take >> all memset liked functions as a general function call? I know this solution >> is less performance efficient, but I would like to have it for my llvm >> assembly level modification works. >> > > It's possible to write an LLVM pass that converts calls to llvm.memset() > into call...
2018 May 22
0
DSE: Remove useless stores between malloc & memset
...> > memoryIsNotModifiedBetween is precisely the sort of expensive > walk we shouldn't be doing... I'm surprised it hasn't caused > any serious issues yet.  Ideally, what we should be doing is > using MemorySSA to find a dependency from the memset: if the > closest dependency is the malloc, there aren't any stores > between the memset and the malloc. (But we aren't using > MemorySSA in DSE yet; see https://reviews.llvm.org/D40480 > <https://reviews.llvm.org/D40480>.) > >...
2014 Mar 11
4
[LLVMdev] Memcpy / Memset for address spaces >= 256
Hi, SelectionDAGBuilder doesn't know how to lower a Memcpy and Memset if one of the pointer operands have an address space >= 256. This is understandable since the libc's memcpy / memset don't work for these address spaces. However, both Clang (when copying a struct) and some optimization passes (LoopIdiomRecognize, MemCpyOpt) can emit memcpy / mems...