This is an archive of the discontinued LLVM Phabricator instance.

[orc] Fix unit tests that use ORC C API
ClosedPublic

Authored by benlangmuir on Aug 24 2021, 11:16 AM.

Details

Summary
  • c_api_tests was failing to build after the API change to __orc_rt_CWrapperFunctionResultAllocate
  • wrapper_function_utils_test was causing an assertion failure, because it was creating a result for void(void) with Size = 0, but seeing an uninitialized pointer, which it considered to be an out-of-bound error.

I noticed locally that making modifications to c_api.h is not causing
these unit tests to be rebuilt, which may be how the bug slipped in in
the first place.

Diff Detail

Event Timeline

benlangmuir requested review of this revision.Aug 24 2021, 11:16 AM
benlangmuir created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2021, 11:16 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
lhames accepted this revision.Aug 24 2021, 1:56 PM

LGTM. Thanks Ben!

I was running this manually during runtime bringup, but never did check that it was being run by any testers. I'll look in to that.

This revision is now accepted and ready to land.Aug 24 2021, 1:56 PM
This revision was landed with ongoing or failed builds.Aug 24 2021, 2:20 PM
This revision was automatically updated to reflect the committed changes.