[llvm] r307831 - Fix to web assembly lib call list

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 15 08:12:35 PDT 2017


On Sat, Jul 15, 2017 at 11:04 AM Chandler Carruth <chandlerc at google.com>
wrote:

> On Sat, Jul 15, 2017 at 11:03 AM Chandler Carruth <chandlerc at google.com>
> wrote:
>
>> On Wed, Jul 12, 2017 at 3:24 PM Daniel Neilson via llvm-commits <
>> llvm-commits at lists.llvm.org> wrote:
>>
>>> Author: dneilson
>>> Date: Wed Jul 12 12:24:07 2017
>>> New Revision: 307831
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=307831&view=rev
>>> Log:
>>> Fix to web assembly lib call list
>>>
>>
>> This patch regressed a basic regression test for the WebAssembly backend.
>> Please always run 'check-llvm' before committing and have the experimental
>> backend you are changing enabled.
>>
>> I'm reverting this and the subsequent patches to get the regression test
>> suite back to green.
>>
>
> Never mind, I can't. Everything else breaks.
>
> I'm disabling the tests instead I guess. Again, please check these things
> before committing in the future, and please get a build bot included in the
> main upstream bots with the backend enabled.
>

Arrrrrg, sorry, my bad, by bisect completely failed here and incorrectly
identified this commit when this commit was innocent. Many apologies, this
patch seems completely fine after all. Sorry that i managed to mis-bisect
and then mis-confirm what was going wrong long enough to write these
emails. =[[[

-Chandler


>
>>
>>>
>>> Summary:
>>>  Revision 307796 caused an internal build break in WebAssembly bots in
>>> the form of a
>>> crash.  ex:
>>> Here's the crash dump from one of the failing tests:
>>>
>>> /usr/local/google/home/blaikie/dev/llvm/build/default/./bin/llc <
>>> /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll
>>> -asm-verbose=false -disable-wasm-fallthrough-return-opt
>>> -disable-wasm-explicit-locals |
>>> /usr/local/google/home/blaikie/dev/llvm/build/default/./bin/FileCheck
>>> /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll
>>> --
>>> Exit Code: 2
>>>
>>> Command Output (stderr):
>>> --
>>> Stack dump:
>>> 0.      Program arguments: build/default/./bin/llc -asm-verbose=false
>>> -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals
>>> 1.      Running pass 'Function Pass Manager' on module '<stdin>'.
>>> 2.      Running pass 'WebAssembly Assembly Printer' on function
>>> '@call_memcpy'
>>> FileCheck error: '-' is empty.
>>> FileCheck command line:  build/default/./bin/FileCheck
>>> src/test/CodeGen/WebAssembly/global.ll
>>>
>>> The problem is in
>>> lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp. There’s an
>>> array declared:
>>> 545 static const char *
>>> Fix to web assembly lib call list
>>>
>>> Summary:
>>>  Revision 307796 caused an internal build break in WebAssembly bots in
>>> the form of a
>>> crash.  ex:
>>> Here's the crash dump from one of the failing tests:
>>>
>>> /usr/local/google/home/blaikie/dev/llvm/build/default/./bin/llc <
>>> /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll
>>> -asm-verbose=false -disable-wasm-fallthrough-return-opt
>>> -disable-wasm-explicit-locals |
>>> /usr/local/google/home/blaikie/dev/llvm/build/default/./bin/FileCheck
>>> /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll
>>> --
>>> Exit Code: 2
>>>
>>> Command Output (stderr):
>>> --
>>> Stack dump:
>>> 0.      Program arguments: build/default/./bin/llc -asm-verbose=false
>>> -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals
>>> 1.      Running pass 'Function Pass Manager' on module '<stdin>'.
>>> 2.      Running pass 'WebAssembly Assembly Printer' on function
>>> '@call_memcpy'
>>> FileCheck error: '-' is empty.
>>> FileCheck command line:  build/default/./bin/FileCheck
>>> src/test/CodeGen/WebAssembly/global.ll
>>>
>>> The problem is in
>>> lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp. There’s an
>>> array declared:
>>> static const char *
>>> RuntimeLibcallNames[RTLIB::UNKNOWN_LIBCALL] = {
>>>
>>>  That is defining a runtime lib call name for each entry in the enum
>>> RTLIB:Libcall from include/llvm/CodeGen/RuntimeLibcalls.h.
>>>
>>> Revision 307796 added entries to the enum, but didn’t add entries to the
>>> RuntimeLibcallNames array, which caused a crash when attempting
>>> to access past the end of the array.
>>>
>>> This patch fixes the issue by adding the element atomic memmove to the
>>> WebAssembly arrays.
>>>
>>> Reviewed by: reames
>>>
>>> Modified:
>>>
>>> llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
>>>
>>> Modified:
>>> llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp?rev=307831&r1=307830&r2=307831&view=diff
>>>
>>> ==============================================================================
>>> ---
>>> llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
>>> (original)
>>> +++
>>> llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
>>> Wed Jul 12 12:24:07 2017
>>> @@ -400,6 +400,12 @@ RuntimeLibcallSignatures[RTLIB::UNKNOWN_
>>>  /* MEMCPY_ELEMENT_ATOMIC_8 */ iPTR_func_iPTR_iPTR_iPTR,
>>>  /* MEMCPY_ELEMENT_ATOMIC_16 */ iPTR_func_iPTR_iPTR_iPTR,
>>>
>>> +/* MEMMOVE_ELEMENT_UNORDERED_ATOMIC_1 */ unsupported,
>>> +/* MEMMOVE_ELEMENT_UNORDERED_ATOMIC_2 */ unsupported,
>>> +/* MEMMOVE_ELEMENT_UNORDERED_ATOMIC_4 */ unsupported,
>>> +/* MEMMOVE_ELEMENT_UNORDERED_ATOMIC_8 */ unsupported,
>>> +/* MEMMOVE_ELEMENT_UNORDERED_ATOMIC_16 */ unsupported,
>>> +
>>>  // EXCEPTION HANDLING
>>>  /* UNWIND_RESUME */ unsupported,
>>>
>>> @@ -844,6 +850,11 @@ RuntimeLibcallNames[RTLIB::UNKNOWN_LIBCA
>>>  /* MEMCPY_ELEMENT_ATOMIC_4 */ "MEMCPY_ELEMENT_ATOMIC_4",
>>>  /* MEMCPY_ELEMENT_ATOMIC_8 */ "MEMCPY_ELEMENT_ATOMIC_8",
>>>  /* MEMCPY_ELEMENT_ATOMIC_16 */ "MEMCPY_ELEMENT_ATOMIC_16",
>>> +/* MEMMOVE_ELEMENT_UNORDERED_ATOMIC_1 */ nullptr,
>>> +/* MEMMOVE_ELEMENT_UNORDERED_ATOMIC_2 */ nullptr,
>>> +/* MEMMOVE_ELEMENT_UNORDERED_ATOMIC_4 */ nullptr,
>>> +/* MEMMOVE_ELEMENT_UNORDERED_ATOMIC_8 */ nullptr,
>>> +/* MEMMOVE_ELEMENT_UNORDERED_ATOMIC_16 */ nullptr,
>>>  /* UNWIND_RESUME */ "_Unwind_Resume",
>>>  /* SYNC_VAL_COMPARE_AND_SWAP_1 */ "__sync_val_compare_and_swap_1",
>>>  /* SYNC_VAL_COMPARE_AND_SWAP_2 */ "__sync_val_compare_and_swap_2",
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170715/9283f455/attachment.html>


More information about the llvm-commits mailing list