search for: dtor

Displaying 20 results from an estimated 615 matches for "dtor".

Did you mean: door
2012 Mar 19
5
[LLVMdev] recognizing DTORs and vptr updates in LLVM.
Hello, While instrumenting LLVM IR in ThreadSanitizer (race detector), I need to distinguish between a store to vtable pointer (vptr) and any other regular store. This special treatment should be limited to class DTORs, so I should also know when a function is a DTOR. Rationale: need to distinguish benign and harmful races on vptr ( http://code.google.com/p/data-race-test/wiki/PopularDataRaces#Data_race_on_vptr ). Currently, I can figure out when a function is a DTOR and when a store touches vptr by analyzing m...
2012 Sep 10
3
[LLVMdev] Question about ctors, dtors and sections on Windows
Hello all! I extended the LDC2 with a pragma to register a funcion in the llvm.global_ctors or llvm.global_dtors list. On Linux, references to these functions are placed in .ctors and .dtors sections and everything runs fine. On Windows, functions from llvm.global_ctors are placed in section .CRT$XCU, which is automatically called by the MS C Runtime. However, functions from llvm.global_dtors are placed...
2012 Mar 19
0
[LLVMdev] recognizing DTORs and vptr updates in LLVM.
On Mar 19, 2012, at 2:52 PM, Kostya Serebryany wrote: > Hello, > > While instrumenting LLVM IR in ThreadSanitizer (race detector), I need to distinguish between a store to vtable pointer (vptr) and any other regular store. > This special treatment should be limited to class DTORs, so I should also know when a function is a DTOR. > Rationale: need to distinguish benign and harmful races on vptr (http://code.google.com/p/data-race-test/wiki/PopularDataRaces#Data_race_on_vptr). > > Currently, I can figure out when a function is a DTOR and when a store touches vptr...
2008 May 12
2
[LLVMdev] Python bindings available.
...JIT, then returns the ModuleProvider, > dropping direct reference to the Module. (ModuleProvider takes ownership of > the Module.) I presume that your Python object is under the impression it > owns the Module; when that goes out of scope, its refcount goes to zero and > it invokes its dtor, disposing of the Module. D'oh— now the ModuleProvider > has a dangling pointer. :) Ah. Good one. Would the following fix it? 1) Have ModuleProvider maintain a reference to the Module it owns, so that the ref count is at least 1 at any time. This is easily done. The only thing le...
2012 Sep 10
0
[LLVMdev] Question about ctors, dtors and sections on Windows
Hello > On Windows, functions from llvm.global_ctors are placed in section .CRT$XCU, > which is automatically called by the MS C Runtime. Only if you link with MS runtime. Mingw follows standard .ctors / .dtors scheme. > My expectation was that the dtors placed in .CRT$XTU which are the C > terminator functions. Maybe there is a way to customize this? Yes. Target (or,rather subtarget) specifies this. Looks like it was somehow missed for dtors. > - How can I control section attributes and aling...
2012 Mar 19
0
[LLVMdev] recognizing DTORs and vptr updates in LLVM.
...2 PM, Kostya Serebryany <kcc at google.com> wrote: > Hello, > > While instrumenting LLVM IR in ThreadSanitizer (race detector), I need > to distinguish between a store to vtable pointer (vptr) and any other > regular store. > This special treatment should be limited to class DTORs, so I should also > know when a function is a DTOR. > Rationale: need to distinguish benign and harmful races on vptr > (http://code.google.com/p/data-race-test/wiki/PopularDataRaces#Data_race_on_vptr). > > Currently, I can figure out when a function is a DTOR and when a store >...
2008 May 12
0
[LLVMdev] Python bindings available.
...oduleProvider, dropping direct reference to the Module. >> (ModuleProvider takes ownership of the Module.) I presume that your >> Python object is under the impression it owns the Module; when that >> goes out of scope, its refcount goes to zero and it invokes its >> dtor, disposing of the Module. D'oh— now the ModuleProvider has a >> dangling pointer. :) > > Ah. Good one. Would the following fix it? > > 1) Have ModuleProvider maintain a reference to the Module it owns, > so that the ref count is at least 1 at any time. This is easily...
2012 Mar 20
1
[LLVMdev] recognizing DTORs and vptr updates in LLVM.
...Mar 19, 2012, at 2:52 PM, Kostya Serebryany wrote: > > Hello, > > While instrumenting LLVM IR in ThreadSanitizer (race detector), I need > to distinguish between a store to vtable pointer (vptr) and any other > regular store. > This special treatment should be limited to class DTORs, so I should also > know when a function is a DTOR. > Rationale: need to distinguish benign and harmful races on vptr ( > http://code.google.com/p/data-race-test/wiki/PopularDataRaces#Data_race_on_vptr > ). > > Currently, I can figure out when a function is a DTOR and when a stor...
2012 Nov 01
1
[PATCH] com32: Include .init_array section in .ctors in linker script
From: Matt Fleming <matt.fleming at intel.com> GCC 4.7 now places pointers to functions with the 'constructor' and 'destructor' function attributes in .init_array and .fini_array sections, respectively, whereas previously they were in the .ctors and .dtors sections. This change breaks the ctors/dtors code as it only expects function to be in the .ctors and .dtors sections, meaning the ctors and dtors functions are never executed. While a COM32_INIT() macro exists that places functions in the .init_array section, no function makes use of it, so ther...
2020 Apr 23
3
Cannot build master
...ines-hidden -Werror=date-time > -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter > -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic > -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default > -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG  -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/bui...
2015 Sep 29
0
[PATCH 2/2] bios: Don't try to guess the sections alignment
...ata.*) __rodata_end = .; } - . = ALIGN(4); - - __ctors_vma = .; - __ctors_lma = __ctors_vma + __text_lma - __text_vma; - .ctors : AT(__ctors_lma) { + .ctors : AT(ADDR(.ctors) + __vma_to_lma) { __ctors_start = .; KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors)) __ctors_end = .; } - __dtors_vma = .; - __dtors_lma = __dtors_vma + __text_lma - __text_vma; - .dtors : AT(__dtors_lma) { + .dtors : AT(ADDR(.dtors) + __vma_to_lma) { __dtors_start = .; KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) __dtors_end = .; } - . = ALIGN(4); - - __dynsym_vma = .; - __dynsym_lma = __dynsym_...
2008 May 12
2
[LLVMdev] Python bindings available.
...ropping direct reference to the Module. > >> (ModuleProvider takes ownership of the Module.) I presume that your > >> Python object is under the impression it owns the Module; when that > >> goes out of scope, its refcount goes to zero and it invokes its > >> dtor, disposing of the Module. D'oh— now the ModuleProvider has a > >> dangling pointer. :) > > > > Ah. Good one. Would the following fix it? > > > > 1) Have ModuleProvider maintain a reference to the Module it owns, > > so that the ref count is at le...
2020 Oct 30
3
Questions about ctor/dtor attribute related diagnostics
Hi, I noticed that there are some diagnostics discrepancies between clang and gcc related to `__attribute__((constructor(n)))` and `__attribute__((destructor(n)))`. *[clang]* It seems priorities >65535 and <0 on ctor/dtor functions are ignored and are set back to default 65535 in clang and Clang only gives an error when > 32-bit unsigned value specified. *[g++]* g++ gives an error for any values <0 and >65535. I am wondering should we let Clang's diagnostics match g++ to make things clearer to the use...
2020 Apr 23
7
Cannot build master
.../bin/clang++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -Wl,-allow-shlib-undefined -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib -Wl,-O3 -Wl,--gc-sections...
2008 May 12
0
[LLVMdev] Python bindings available.
...o say, it's all work in progress, but mostly it works as > expected. More tests, documentation and APIs will follow.] Hi Mahadevan, One more thing I noticed that may be a problem. Automatic finalizers like this one are very dangerous when cooperating with the C++ object model: void dtor_LLVMModuleRef(void *p) { LLVMModuleRef m = (LLVMModuleRef)p; LLVMDisposeModule(m); } Consider the case where a function creates and populates a Module, stuffs it in an ExistingModuleProvider for the JIT, then returns the ModuleProvider, dropping direct reference to the Module. (Mod...
2020 Apr 23
2
Cannot build master
...-fvisibility-inlines-hidden -Werror=date-time > -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter > -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic > -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default > -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -std=c++14 -MD -MT > > tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangASTNodesEmitter.cpp....
2015 Sep 29
10
[PATCH 0/2] Fixes for gcc 5
From: Sylvain Gault <sylvain.gault at gmail.com> TL;DR: The section aligment in linker scripts messed-up the memory mapping needed for the compression / decompression to work. The bug with gcc 5 is not trivial, I'll do my best to explain it here. Basically, there are two memory mappings of the code. One in "virtual memory", and one in "load memory". The one in
2015 Mar 19
2
[LLVMdev] Final added to parser<bool>
..., 2015 at 6:48 PM, reed kotler <rkotler at mips.com> wrote: >> >> Hi David, >> >> Is there a reason that we need to have "final" for parser<bool> ??? > > > Clang has a (reasonable) warning for types with virtual functions and a > non-virtual dtor. This warning is suppressed if the dtor is protected or the > class is final (since in the first case it's clear that the user intends not > to destroy objects via base pointers, only derived ones - and in the second > case there's no risk of derived classes, so public access to th...
2012 Mar 19
5
[LLVMdev] recognizing DTORs and vptr updates in LLVM.
...Mar 19, 2012, at 2:52 PM, Kostya Serebryany wrote: > > Hello, > > While instrumenting LLVM IR in ThreadSanitizer (race detector), I need > to distinguish between a store to vtable pointer (vptr) and any other > regular store. > This special treatment should be limited to class DTORs, so I should also > know when a function is a DTOR. > Rationale: need to distinguish benign and harmful races on vptr > (http://code.google.com/p/data-race-test/wiki/PopularDataRaces#Data_race_on_vptr). > > Currently, I can figure out when a function is a DTOR and when a store >...
2013 Jul 29
0
[PATCH] drm/nouveau/vdec: copy nvc0 bsp/vp/ppp to nv98
...***************** - * BSP context + * PBSP context ******************************************************************************/ static struct nouveau_oclass nv98_bsp_cclass = { .handle = NV_ENGCTX(BSP, 0x98), .ofuncs = &(struct nouveau_ofuncs) { - .ctor = _nouveau_engctx_ctor, - .dtor = _nouveau_engctx_dtor, - .init = _nouveau_engctx_init, - .fini = _nouveau_engctx_fini, - .rd32 = _nouveau_engctx_rd32, - .wr32 = _nouveau_engctx_wr32, + .ctor = _nouveau_falcon_context_ctor, + .dtor = _nouveau_falcon_context_dtor, + .init = _nouveau_falcon_context_init, + .fini = _nouveau_...