similar to: A potential race on StaticList in RegisterManagedStatic

Displaying 20 results from an estimated 100 matches similar to: "A potential race on StaticList in RegisterManagedStatic"

2016 Dec 26
0
A potential race on StaticList in RegisterManagedStatic
Though it won't actually help to guard this: while (StaticList) - a fence here is needed... On Mon, Dec 26, 2016 at 9:20 AM, Viacheslav Nikolaev < viacheslav.nikolaev at gmail.com> wrote: > Ptr member of ManagedStaticBase is now atomic. > In ManagedStaticBase::RegisterManagedStatic we have such code: > > void *Tmp = Creator(); > > Ptr.store(Tmp,
2006 Apr 03
5
Is old school STI broken? How would you do the same now?
So this new STI :through thing is still not clear to me. I have a project now where I''m using this: class List < ActiveRecord::Base belongs_to :user end class StaticList < List has_and_belongs_to_many :items end In the script/console: >> StaticList.create NameError: uninitialized constant StaticList What? ok, fine. So a List.create would be in
2019 Nov 18
2
Unable to parse command line more than once using llvm libraries?
Thanks, I tried calling ResetAllOptionOccurrences after the run like this… // Compile the module TimeCompilations times to give better compile time // metrics. for (unsigned I = TimeCompilations; I; --I) if (int RetVal = compileModule(argv, Context)) return RetVal; if (YamlFile) YamlFile->keep(); cl::ResetAllOptionOccurrences(); return 0; } Unfortunately
2012 Jan 13
2
[LLVMdev] Memory leaks in LLVM on linux
I am trying to figure out how to free up some memory that seems to be lost when running valgrind under our internal application. The stack traces I get are: ==19966== 4 bytes in 1 blocks are still reachable in loss record 1 of 12 ==19966== at 0x402569A: operator new(unsigned int) (vg_replace_malloc.c:255) ==19966== by 0x5D9BBE8: void* llvm::object_creator<llvm::PassRegistry>()
2016 Dec 07
2
Race condition in raw_ostream
> On Dec 7, 2016, at 10:27 AM, Viacheslav Nikolaev <viacheslav.nikolaev at gmail.com> wrote: > > > I believe it’ll always forward directly to raw_fd_ostream::write_impl(), which is calling the libc ::write(). > > Do you mean raw_fd_ostream somehow overrides the operator<< the code for which I extracted? > I cannot see if that is so. And I really saw it didn't
2016 Dec 07
3
Race condition in raw_ostream
On Wed, Dec 7, 2016 at 10:02 AM, Mehdi Amini via llvm-dev < llvm-dev at lists.llvm.org> wrote: > > > On Dec 7, 2016, at 1:52 AM, Viacheslav Nikolaev via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > > > This code from raw_ostream.h is really racy: > > > > raw_ostream &operator<<(StringRef Str) { > > // Inline fast path,
2020 Sep 30
2
Creating a global variable for a struct array
Let me clarify my question. I have a struct array h1 as follows: dhash h1[10]; I want to get a Constant* to variable h1. It looks like I can use ConstantStruct::get(StructType*, ArrayRef<Constant *>) to do this. My question is how to get the second argument of type ArrayRef<Constant *> from the above variable h1. Thanks, Chaitra ________________________________ From: Tim Northover
2017 Sep 19
3
Help with segfault in llvm_shutdown with LLVM 5.0 Release build
Hi, We are upgrading an LLVM 4.0-based opt module to LLVM 5.0. After the upgrade our module works when built with an LLVM Debug build, but with an LLVM Release build we are encountering the following error. This happens after our passes have successfully run. I believe this has to do with the way our passes are registered. Would greatly appreciate some pointers, as to where to look. Program
2013 Mar 28
0
[LLVMdev] Avoid Valgrind's still-reachable leak warnings
Hi, I'm Ryo Onodera. This is my first post to this mailing list. Fist, thanks for creating a great library! We're using LLVM to support JIT in Rubinius (an alternative implementation of Ruby, a dynamic programming language). I'm submitting a small patch for a minor issue. It solves still-reachable leak warnings from Valgrind. Example warnings are shown at the end of this mail. As
2016 Dec 07
2
Race condition in raw_ostream
This code from raw_ostream.h is really racy: raw_ostream &operator<<(StringRef Str) { // Inline fast path, particularly for strings with a known length. size_t Size = Str.size(); // Make sure we can use the fast path. if (Size > (size_t)(OutBufEnd - OutBufCur)) return write(Str.data(), Size); if (Size) { memcpy(OutBufCur, Str.data(), Size);
2020 Oct 01
2
Creating a global variable for a struct array
Thank you very much. The code to initialize h1 to non-zero values was what I was looking for. It's almost working except for a type mismatch wrt dlist* llist field of h1. dlist static_lst[10] = { {1, 5, NULL}, ... }; dhash h1[10] = {{"myfile.txt", static_lst}, ... }; Along the lines of the code you had sent, I created a GlobalVariable* llist of type [10 x %struct.dlist]* for the
2010 Mar 23
2
[LLVMdev] How to avoid memory leaks
Hi Jeffrey, Listed below the Full valgrind report (using latest revision r99309) The program creates many thousands of instructions and values as you can see from the report below ==20504== Memcheck, a memory error detector ==20504== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==20504== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for copyright info ==20504==
2016 Jul 01
2
How to resolve conflicts between sanitizer_common and system headers
Hi Sanitizer Runtime Developers, We recently ran into a problem building clang because some of the definitions in sanitizer_common conflicted with system definitions and later another system header was trying to use the system definition: .../usr/include/libkern/OSAtomicDeprecated.h:756:17: error: reference to 'memory_order_relaxed' is ambiguous __theAmount, memory_order_relaxed) +
2018 May 04
1
Compiler Engineer openings at Samsung in Moscow
Samsung R&D Institute Russia is looking for a senior compiler engineer to work on LLVM based compiler for new Samsung GPU. *What you'll be doing:* - Design and develop target independent and processor specific optimizations - Work on compiler improvements and problem resolutions - Perform benchmarking and testing to improve quality of compiler - Review code changes and design proposals
2016 Jul 01
2
How to resolve conflicts between sanitizer_common and system headers
> On Jul 1, 2016, at 12:10 PM, Dmitry Vyukov <dvyukov at google.com> wrote: > > On Fri, Jul 1, 2016 at 8:53 PM, Anna Zaks <ganna at apple.com> wrote: >> Hi Sanitizer Runtime Developers, >> >> We recently ran into a problem building clang because some of the >> definitions in sanitizer_common conflicted with system definitions and later >>
2013 Feb 13
0
[LLVMdev] ManagedStatic and order of destruction
Right, I'm suggesting we keep llvm_shutdown() for users who want this control, but also destroy still-live ManagedStatic instances if llvm_shutdown() is not called. This helps in the case where there is not a clear time when llvm_shutdown() can be called, especially given that LLVM cannot be resurrected in the same process due to current limitations in the pass registry, and perhaps
2014 Apr 18
2
[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
On Fri, Apr 18, 2014 at 11:13 AM, Dmitry Vyukov <dvyukov at google.com> wrote: > Hi, > > This is long thread, so I will combine several comments into single email. > > > >> - 8-bit per-thread counters, dumping into central counters on overflow. > >The overflow will happen very quickly with 8bit counter. > > Yes, but it reduces contention by 256x (a thread
2008 Jul 15
0
[LLVMdev] addrspace attribute and intrisics
Hi Mon Wang, As I understand it the C++0x memory model will, by default, be similar to Java's in that it will assume sequential consistency, using acquire/release atomics (similar to Java's volatile), for all programs that do not contain data races. Unlike Java in the case when a program contains a data race, the program behavior is undefined. Adopting this model allows many sequential
2013 Feb 09
3
[LLVMdev] ManagedStatic and order of destruction
I'm curious about the design rationale for how ManagedStatic instances are cleaned up, and I'm hoping someone can shed some light on it. Currently, ManagedStatic objects are cleaned up when llvm_shutdown() traverses the global list of initialized objects and calls destroy() on each. This leads to two questions: 1. An assertion enforces that the objects are deleted in reverse order of
2017 Sep 19
0
Help with segfault in llvm_shutdown with LLVM 5.0 Release build
On 9/18/2017 8:20 PM, Diptorup Deb via llvm-dev wrote: > Hi, > > We are upgrading an LLVM 4.0-based opt module to LLVM 5.0. After the > upgrade our module works when built with an LLVM Debug build, but > with an LLVM Release build we are encountering the following error. > > This happens after our passes have successfully run. I believe this > has to do with the way our