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

Itaru Kitayama via Openmp-dev openmp-dev at lists.llvm.org
Mon Aug 12 18:40:37 PDT 2019


Alexey,
Could you point us to the corresponding LLVM Bug entry?

On Wed, Aug 7, 2019 at 1:25 AM Alexey Bataev <a.bataev at outlook.com> wrote:

> Hi Itary, I identified the cause of the problem with your app. The
> compiler works correctly, but one of the tools, clang-offload-bundler,
> produces a lot of junk in the bundled object files and it breaks linking.
> I'm working on the fix.
>
> -------------
> Best regards,
> Alexey Bataev
>
> 04.08.2019 22:25, Alexey Bataev via Openmp-dev пишет:
>
> 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> написал(а):
>
> 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>
> 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
> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>
>
> _______________________________________________
> Openmp-dev mailing listOpenmp-dev at lists.llvm.orghttps://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/20190813/44b9a669/attachment.html>


More information about the Openmp-dev mailing list