search for: bumpptrallocator

Displaying 20 results from an estimated 50 matches for "bumpptrallocator".

2011 Oct 16
2
[LLVMdev] Static destructor problem with recent HEAD
...easily fixed. However, I'm now >> getting a "pure virtual method called" exception (__cxa_pure_virtual) which >> I wasn't getting before. This is happening in the destructor of a >> statically-initialized object. (More precisely, it's blowing up in a >> BumpPtrAllocator, which is used by a StringMap, which is in turn a member of >> a statically initialized object.) >> >> Anyone know what might have changed recently that would cause this? >> > > It would help a lot to see the actual backtrace etc. ;] > Sure thing (although I'm...
2011 Oct 16
0
[LLVMdev] Static destructor problem with recent HEAD
...78da5d2 __tcf_0 + 0 5 libstdc++.6.dylib 0x00007fff878d8ae1 __cxxabiv1::__terminate(void (*)()) + 11 6 libstdc++.6.dylib 0x00007fff878d8b16 __cxxabiv1::__unexpected(void (*)()) + 0 7 libstdc++.6.dylib 0x00007fff878d8fd6 std::bad_cast::what() const + 0 8 tartc 0x000000010106ad46 llvm::BumpPtrAllocator::DeallocateSlabs(llvm::MemSlab*) + 166 9 tartc 0x000000010106ac99 llvm::BumpPtrAllocator::~BumpPtrAllocator() + 25 10 tartc 0x000000010106ac75 llvm::BumpPtrAllocator::~BumpPtrAllocator() + 21 11 tartc 0x00000001000388b6 llvm::StringMap<char, llvm::BumpPtrAllo...
2008 Jul 16
1
[LLVMdev] Stupid question about BumpPtrAllocator
I'll preface by saying I'm new to LLVM - I noticed there is an efficient BumpPtrAllocator - however, I can't figure out how I can allocate IR objects using that allocator. It looks like all the factory methods use regular new/delete. I'm sure someone BumpPtrAllocator is there for a good reason, and someone here has thought of this use case before. Anyone want to comment? Is...
2009 Feb 05
1
[LLVMdev] Installations problems CLANG
...: Entering directory `/home/na2271/Desktop/llvm-2.3-x/tools/clang/lib/Basic' llvm[2]: Compiling SourceManager.cpp for Release build SourceManager.cpp: In member function 'void clang::LineTableInfo::clear()': SourceManager.cpp:124: error: 'class llvm::StringMap<unsigned int, llvm::BumpPtrAllocator>' has no member named 'clear' SourceManager.cpp: In member function 'const clang::SrcMgr::ContentCache* clang::SourceManager::getOrCreateContentCache(const clang::FileEntry*)': SourceManager.cpp:367: error: no matching function for call to 'llvm::BumpPtrAllocator::Allocat...
2011 Oct 16
2
[LLVMdev] Static destructor problem with recent HEAD
...al things broke, most of which were easily fixed. However, I'm now getting a "pure virtual method called" exception (__cxa_pure_virtual) which I wasn't getting before. This is happening in the destructor of a statically-initialized object. (More precisely, it's blowing up in a BumpPtrAllocator, which is used by a StringMap, which is in turn a member of a statically initialized object.) Anyone know what might have changed recently that would cause this? -- -- Talin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-d...
2011 Oct 16
0
[LLVMdev] Static destructor problem with recent HEAD
...t of which were easily fixed. However, I'm now > getting a "pure virtual method called" exception (__cxa_pure_virtual) which > I wasn't getting before. This is happening in the destructor of a > statically-initialized object. (More precisely, it's blowing up in a > BumpPtrAllocator, which is used by a StringMap, which is in turn a member of > a statically initialized object.) > > Anyone know what might have changed recently that would cause this? > It would help a lot to see the actual backtrace etc. ;] -------------- next part -------------- An HTML attachment w...
2010 Mar 19
1
[LLVMdev] Checker for destruction-needing classes allocated in BumpPtrAllocators?
Hi Ted, Doug said you might have a clang-based checker that would detect when people allocate memory with a BumpPtrAllocator and then construct a class into it that needs destruction. In killing valgrind-found memory leaks in LLVM, I've found several instances of this mistake. They often involve SmallVectors, which only show up as leaks in valgrind if they happen to overflow their static allocation, so it would be us...
2016 Mar 23
4
UBSan, StringRef and Allocator.h
Hi all (No idea if I have the correct audience. Please CC more people as needed). I have an UBSan failure in BumpPtrAllocatorImpl.Allocate. The problem is that lld requests that we StringRef::copy an empty string. This passes a length of 0 to a BumpPtrAllocator. The BumpPtrAllocator happened to not have anything allocated yet so the CurPtr is nullptr, but given that we need 0 space we think we have enough space and ret...
2015 May 20
5
[LLVMdev] RFC: Reduce the memory footprint of DIEs (and DIEValues)
...at memory profiles of running llc on verify-uselistorder.lto.opt.bc (ld -save-temps dump just before CodeGen of building verify-uselistorder with -flto -g). I've attached leak-backend.patch, which we're using to make Intrustruments more accurate (instead of effectively leaking things onto BumpPtrAllocators, really leak them with malloc()). (I've collected this data on top of a few not-yet-committed patches to cheapen `MCSymbol` and `EmitLabelDifference()` that chop around 8% of memory off the top, but otherwise these numbers should be reproducible in ToT.) The `DIE` class is huge. Directly, i...
2018 Aug 29
4
Identifying objects within BumpPtrAllocator.
...onally, pointers are hard to read and memorize; it's hard to notice the difference between 0x7f80a28325e0 and 0x7f80a28325a0, especially when they're a few screens apart. Hence the idea: why don't we print the offset into the allocator's memory slab instead of a pointer? We use BumpPtrAllocator all over the place, which boils down to a set of slabs on which all objects are placed in the order in which they are allocated. It is easy for the allocator to identify if a pointer belongs to that allocator, and if so, deteremine which slab it belongs to and at what offset the object is in t...
2016 Mar 23
3
UBSan, StringRef and Allocator.h
...m> wrote: > > > > On Tue, Mar 22, 2016 at 5:30 PM, Pete Cooper <peter_cooper at apple.com <mailto:peter_cooper at apple.com>> wrote: > Hi all > > (No idea if I have the correct audience. Please CC more people as needed). > > I have an UBSan failure in BumpPtrAllocatorImpl.Allocate. > > The problem is that lld requests that we StringRef::copy an empty string. This passes a length of 0 to a BumpPtrAllocator. The BumpPtrAllocator happened to not have anything allocated yet so the CurPtr is nullptr, but given that we need 0 space we think we have enough spa...
2018 Aug 29
3
[cfe-dev] Identifying objects within BumpPtrAllocator.
...rs are hard to read and memorize; it's hard to notice the difference between 0x7f80a28325e0 and 0x7f80a28325a0, especially when they're a few screens apart. >> >> Hence the idea: why don't we print the offset into the allocator's memory slab instead of a pointer? We use BumpPtrAllocator all over the place, which boils down to a set of slabs on which all objects are placed in the order in which they are allocated. It is easy for the allocator to identify if a pointer belongs to that allocator, and if so, deteremine which slab it belongs to and at what offset the object is in that s...
2016 Mar 23
0
UBSan, StringRef and Allocator.h
On Tue, Mar 22, 2016 at 5:30 PM, Pete Cooper <peter_cooper at apple.com> wrote: > Hi all > > (No idea if I have the correct audience. Please CC more people as needed). > > I have an UBSan failure in BumpPtrAllocatorImpl.Allocate. > > The problem is that lld requests that we StringRef::copy an empty string. > This passes a length of 0 to a BumpPtrAllocator. The BumpPtrAllocator > happened to not have anything allocated yet so the CurPtr is nullptr, but > given that we need 0 space we think we ha...
2009 Oct 07
0
[LLVMdev] patch for CIndex linakge error on Mingw, set the proper LINKER_LANGUAGE for CIndex and c-index-test
...ngBasic.a -lgcc_eh -lgcc_eh -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 ..\..\..\..\lib\libclangFrontend.a(ASTUnit.cpp.obj):ASTUnit.cpp:(.text$_ZN5clang13SourceManagerC1Ev[clang::SourceManager::SourceManager()]+0xf): undefined reference to `llvm::BumpPtrAllocator::DefaultSlabAllocator' ..\..\..\..\lib\libclangFrontend.a(ASTUnit.cpp.obj):ASTUnit.cpp:(.text$_ZN5clang13SourceManagerC1Ev[clang::SourceManager::SourceManager()]+0x27): undefined reference to `llvm::BumpPtrAllocator::BumpPtrAllocator(unsigned int, unsigned int, llvm::SlabAllocator&)' .....
2016 Mar 23
0
UBSan, StringRef and Allocator.h
On Tue, Mar 22, 2016 at 5:30 PM, Pete Cooper via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Hi all > > (No idea if I have the correct audience. Please CC more people as needed). > > I have an UBSan failure in BumpPtrAllocatorImpl.Allocate. > > The problem is that lld requests that we StringRef::copy an empty string. > This passes a length of 0 to a BumpPtrAllocator. The BumpPtrAllocator > happened to not have anything allocated yet so the CurPtr is nullptr, but > given that we need 0 space we think we ha...
2012 Dec 13
0
[LLVMdev] Memory leaks after llvm_shutdown
...ors of static objects created new ManagedStatic objects, which was never freed. Then I tried to use static global llvm_shutdown_obj to cause destruction of ManagedStatics after calling all static destructors. In that case I got "pure virtual function call" because of early release of BumpPtrAllocator::DefaultSlabAllocator. Call stack for this case: msvcr100d.dll!_purecall() Line 54 + 0x7 bytes C > llvm_test.exe!llvm::BumpPtrAllocator::DeallocateSlabs(llvm::MemSlab * Slab) Line 71 + 0x1b bytes C++ llvm_test.exe!llvm::BumpPtrAllocator::~BumpPtrAllocator() Line 30 C++...
2016 Mar 23
0
UBSan, StringRef and Allocator.h
...;> >> On Tue, Mar 22, 2016 at 5:30 PM, Pete Cooper <peter_cooper at apple.com <mailto:peter_cooper at apple.com>> wrote: >> Hi all >> >> (No idea if I have the correct audience. Please CC more people as needed). >> >> I have an UBSan failure in BumpPtrAllocatorImpl.Allocate. >> >> The problem is that lld requests that we StringRef::copy an empty string. This passes a length of 0 to a BumpPtrAllocator. The BumpPtrAllocator happened to not have anything allocated yet so the CurPtr is nullptr, but given that we need 0 space we think we have en...
2016 Mar 28
2
UBSan, StringRef and Allocator.h
...mail.com> wrote: > > > > On Tue, Mar 22, 2016 at 5:30 PM, Pete Cooper <peter_cooper at apple.com> > wrote: > >> Hi all >> >> (No idea if I have the correct audience. Please CC more people as >> needed). >> >> I have an UBSan failure in BumpPtrAllocatorImpl.Allocate. >> >> The problem is that lld requests that we StringRef::copy an empty >> string. This passes a length of 0 to a BumpPtrAllocator. The >> BumpPtrAllocator happened to not have anything allocated yet so the CurPtr >> is nullptr, but given that we need 0...
2010 Aug 09
0
[LLVMdev] MmapAllocator
...ry. That's interesting. How did you measure this? I'd love to see your data. Note that the LiveRange struct is allocated by a plain std::vector, and your patch doesn't change that. I assume you are talking about the VNInfo structs? > I wrote a replacement allocator for use by > BumpPtrAllocator which uses mmap()/munmap() in place of > malloc()/free(). It's a bit more complicated than that. Modern malloc's use a whole bag of tricks to avoid lock contention in multiprocessor systems, and they know which allocation size the kernel likes, and which system calls to use. By calling...
2010 Jul 26
2
[LLVMdev] hacking clang IdentifierTable
Hi all, Clang use a hash table to store all its identifiers. The hash table definition is: typedef llvm::StringMap<IdentifierInfo*, llvm::BumpPtrAllocator> HashTableTy; HashTableTy HashTable; Can anyone explain the mechnism of handling the name string key collision for me? Is there a IdentifierInfo objects chain or list for variable or function with the same name? Thanks very much! Yabin -- The question is how do you generate these offline an...