[Openmp-dev] Global BSS symbol not initialized properly if built with -fopenmp-targets=nvptx64

Alexey Bataev via Openmp-dev openmp-dev at lists.llvm.org
Sun Aug 4 19:25:58 PDT 2019


I did not agreed that this is the bug in clang, I'm still investigating the problem.

Best regards,
Alexey Bataev

4 авг. 2019 г., в 22:01, Itaru Kitayama via Openmp-dev <openmp-dev at lists.llvm.org<mailto:openmp-dev at lists.llvm.org>> написал(а):

All,
Alexey agreed this is a bug of Clang and is working on a fix, as during the global initialization phase, the instance's pointer to the vtable is never set.

On Thu, Jul 25, 2019 at 1:47 PM Itaru Kitayama <itaru.kitayama at gmail.com<mailto:itaru.kitayama at gmail.com>> wrote:
Hi,
I am revisiting this possible compiler bug in Clang 8.0.0.

In the source code I am developing, there's a global static variable, nest::sli_neuron::recordablesMap_ put in the BSS section and it is expected to be fully initialized by the time nest::sli_neuron::sli_neuron() gets called, however in a gdb session:

(gdb) p nest::sli_neuron::recordablesMap_
Python Exception <type 'exceptions.AttributeError'> 'gdb.Type' object has no attribute 'name':
$1 = {<std::map<Name, double (nest::sli_neuron::*)() const, std::less<Name>, std::allocator<std::pair<Name const, double (nest::sli_neuron::*)() const> > >> = std::map with 0 elements, _vptr$RecordablesMap = 0x0}

this doesn't happen when -fopenmp-targets is _not_ used, is it not trivial to come up a reproducer, thus I am sending a work-in-progress report hoping someone will shed some light on this.

Thanks,
Itaru.
_______________________________________________
Openmp-dev mailing list
Openmp-dev at lists.llvm.org<mailto:Openmp-dev at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20190805/a8be8932/attachment.html>


More information about the Openmp-dev mailing list