clang/win: Assertion failed 'cannot emit delegate call arguments for inalloca arguments' in certain cases involving lambdas |
|||||||||
Issue descriptionhttps://build.chromium.org/p/chromium.fyi/builders/CrWinClngLLDdbg/builds/3730/steps/compile/logs/stdio FAILED: obj/device/bluetooth/device_unittests.bluetooth_remote_gatt_characteristic_unittest.obj ninja -t msvc -e environment.x86 -- "..\..\third_party/llvm-build/Release+Asserts/bin/clang-cl" -m32 /nologo /showIncludes /FC @obj\device\bluetooth\device_unittests.bluetooth_remote_gatt_characteristic_unittest.obj.rsp /c ..\..\device\bluetooth\bluetooth_remote_gatt_characteristic_unittest.cc /Foobj\device\bluetooth\device_unittests.bluetooth_remote_gatt_characteristic_unittest.obj /Fdobj\device\device_unittests.cc.pdb Assertion failed: !isInAllocaArgument(CGM.getCXXABI(), type) && "cannot emit delegate call arguments for inalloca arguments!", file C:\b\build\slave\CrWinClngLLDdbg\build\src\third_party\llvm\tools\clang\lib\CodeGen\CGCall.cpp, line 2871 Wrote crash dump file "C:\Users\CHROME~1\AppData\Local\Temp\clang-cl.exe-1554e0.dmp" The bot's been red for a very long time due to bug 622806, so not sure if this is a regression. (sorry that so much is broken during your shift :-( )
,
Jun 24 2016
Looking
,
Jun 24 2016
Culprit is Chromium r401911 which triggered a pre-existing bug in the compiler. Same problem is visible on the non-ToT bot: https://build.chromium.org/p/chromium.fyi/builders/CrWinClang/builds/10185/steps/compile/logs/stdio
,
Jun 24 2016
Huh, that's pretty unfortunate :-( I guess next step is to make a small repro, and then with that in hand maybe some simple temporary workaround we could land chromium becomes apparent?
,
Jun 24 2016
https://codereview.chromium.org/2085293002 https://cs.chromium.org/chromium/src/device/bluetooth/bluetooth_adapter.h?q=NotifyGattCharacteristicValueChanged&sq=package:chromium&dr=CSs&l=463 takes a BluetoothRemoteGattCharacteristic*, `this` is a BluetoothRemoteGattCharacteristicWin. Maybe doing BluetoothRemoteGattCharacteristic* arg = this; and then passing arg works around the problem?
,
Jun 25 2016
Filed https://llvm.org/bugs/show_bug.cgi?id=28299 and sent workaround: https://codereview.chromium.org/2089313006
,
Jun 25 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/292962a4de3a928fbc25539ab557169b86e89e88 commit 292962a4de3a928fbc25539ab557169b86e89e88 Author: pcc <pcc@chromium.org> Date: Sat Jun 25 01:49:50 2016 bluetooth: Avoid use of lambda to work around clang bug. Clang has a bug [1] that is exposed by the use of a lambda in this unit test. Until that is fixed, work around it by turning the lambda into a static function. Should help unblock the next clang roll. [1] https://llvm.org/bugs/show_bug.cgi?id=28299 BUG=623209 R=ortuno@chromium.org,thakis@chromium.org Review-Url: https://codereview.chromium.org/2089313006 Cr-Commit-Position: refs/heads/master@{#402043} [modify] https://crrev.com/292962a4de3a928fbc25539ab557169b86e89e88/device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc
,
Jun 26 2016
Doesn't block the roll, but let's keep this open so we'll remember to revert the workaround once clang-cl is able to do this. Thanks, pcc!
,
Jun 26 2016
,
Jun 30 2016
,
Aug 25 2016
I looked at this a while ago, and it's hard. Clang's lambda code assumes it can perfectly forward arguments, which is just not true with inalloca.
,
Jul 31 2017
Looks like this is still a problem. rnk: If the codegen part is hard to fix, could we at least emit a diagnostic when needing to forward an inalloca arg to a lambda instead of asserting?
,
Aug 2 2017
,
Aug 2 2017
,
Aug 18 2017
,
Aug 18 2017
,
Dec 12
,
Dec 13
I turned the assertion into a codegen-time diagnostic, but fixing the actual bug is still hard. I worked on it, but I timed out and have to move onto something else. |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by thakis@chromium.org
, Jun 24 2016