This is an archive of the discontinued LLVM Phabricator instance.

Fix runtime crash inside __kmpc_init_allocator
ClosedPublic

Authored by jyu2 on May 26 2023, 11:24 AM.

Details

Summary

It seems load of traits.addr should be passed in runtime call. Currently
the load of load traits.addr gets passed cause runtime to fail.

To fix this, skip the call to EmitLoadOfScalar for extra load.

Diff Detail

Event Timeline

jyu2 created this revision.May 26 2023, 11:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2023, 11:24 AM
jyu2 requested review of this revision.May 26 2023, 11:24 AM
This revision is now accepted and ready to land.May 26 2023, 11:27 AM
This revision was landed with ongoing or failed builds.May 26 2023, 4:06 PM
This revision was automatically updated to reflect the committed changes.

observing failure in our amdgpu buildbot , 3 tests
see: https://lab.llvm.org/staging/#/builders/247/builds/947

7: tgt_target_table *tgt_rtl_load_binary(int32_t, __tgt_device_image *): Assertion `Table != nullptr && "Invalid table"' failed.

if you have a quick fix, please apply, otherwise please revert and fix.
if you need someone to work with on our end, let me know.

also , i see you marked one test unsupported, but it seems like it should be reported.
please consult with us to see if there is a better solution than instantly xfailing the test.

also i see two additional failures

libomptarget :: amdgcn-amd-amdhsa :: jit/empty_kernel_lvl1.c
libomptarget :: amdgcn-amd-amdhsa :: jit/empty_kernel_lvl2.c

i think the extra two failures are not related to you patch. so ignore comment about these
libomptarget :: amdgcn-amd-amdhsa :: jit/empty_kernel_lvl1.c
libomptarget :: amdgcn-amd-amdhsa :: jit/empty_kernel_lvl2.c

apologies, i just realized its a new test that you xfailed.