So without declspec(align(8)) was this a silent codegen bug in update 2? Despite the error message, I don't think this happens on a pass by value, as std atomic is not copyable On Thu, Jun 30, 2016 at 3:49 PM Reid Kleckner via lldb-dev < lldb-dev@lists.llvm.org> wrote:
> 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@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 <amcca...@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.lav...@octasic.com> wrote: >>> >>>> 32-bit. >>>> ------------------------------ >>>> *From:* Adrian McCarthy [amcca...@google.com] >>>> *Sent:* Thursday, June 30, 2016 5:36 PM >>>> *To:* Philippe Lavoie >>>> *Cc:* lldb-dev@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@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@lists.llvm.org >>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev >>>>> >>>>> >>>> >>> >> >> _______________________________________________ >> lldb-dev mailing list >> lldb-dev@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev >> >> > _______________________________________________ > lldb-dev mailing list > lldb-dev@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev >
_______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev