[lldb-dev] compile failure with VS 2015 Update 3
Reid Kleckner via lldb-dev
lldb-dev at lists.llvm.org
Thu Jun 30 15:49:34 PDT 2016
Right, the x86_32 calling convention that MSVC uses fails to align such
objects, and this is the error you get if you try. VS 2015 update 3
probably added __declspec(align(8)) to std::atomic<__int64>, triggering
this error if you pass one or an object that contains one by value.
On Thu, Jun 30, 2016 at 3:16 PM, Adrian McCarthy via lldb-dev <
lldb-dev at lists.llvm.org> wrote:
> I left out some words. I meant:
>
> The answers on that StackOverflow question claim that 32-bit MSVC never
> does more than 32-byte alignment *for parameters*.
>
> On Thu, Jun 30, 2016 at 3:12 PM, Adrian McCarthy <amccarth at google.com>
> wrote:
>
>> `default_stop_addr` is an `Address` which contains a
>> `std::atomic<lldb::addr_t>`. The `addr_t` is a 64-bit value, so I assume
>> it needs 64-bit alignment. The answers on that StackOverflow question
>> claim that 32-bit MSVC never does more than 32-byte alignment. So my guess
>> is that this has always been a problem, and the newer compiler is just
>> better at reporting it.
>>
>> On Thu, Jun 30, 2016 at 2:56 PM, Philippe Lavoie <
>> philippe.lavoie at octasic.com> wrote:
>>
>>> 32-bit.
>>> ------------------------------
>>> *From:* Adrian McCarthy [amccarth at google.com]
>>> *Sent:* Thursday, June 30, 2016 5:36 PM
>>> *To:* Philippe Lavoie
>>> *Cc:* lldb-dev at lists.llvm.org
>>> *Subject:* Re: [lldb-dev] compile failure with VS 2015 Update 3
>>>
>>> Compiling for 32-bit or 64-bit?
>>>
>>> This question looks relevant:
>>> http://stackoverflow.com/questions/21743144/using-stdatomic-with-aligned-classes
>>>
>>> On Thu, Jun 30, 2016 at 1:19 PM, Philippe Lavoie via lldb-dev <
>>> lldb-dev at lists.llvm.org> wrote:
>>>
>>>> Hello,
>>>>
>>>> has anyone tried to compile LLDB with Visual Studio 2015 Update 3 ?
>>>>
>>>> It compiles fine with Update 2, but with Update 3 we get error messages
>>>> like:
>>>>
>>>> D:\dev\llvm\tools\lldb\include\lldb/Target/Process.h(3194): error
>>>> C2719:
>>>> 'default_stop_addr': formal parameter with requested alignment of 8
>>>> won't be aligned
>>>> (compiling source file
>>>> D:\dev\llvm\tools\lldb\source\Expression\FunctionCaller.cpp)
>>>>
>>>> although there is no __declspec(align) on that parameter.
>>>> We reported the issue to Microsoft here:
>>>>
>>>> https://connect.microsoft.com/VisualStudio/feedback/details/2870567/lldb-no-longer-compiles
>>>>
>>>> -Philippe
>>>>
>>>> _______________________________________________
>>>> lldb-dev mailing list
>>>> lldb-dev at lists.llvm.org
>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>>>
>>>>
>>>
>>
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160630/8b410937/attachment-0001.html>
More information about the lldb-dev
mailing list