LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 52153 - Regression(962a2479b57f): Interpreter/execute.cpp failing on mac/arm64
Summary: Regression(962a2479b57f): Interpreter/execute.cpp failing on mac/arm64
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: Frontend (show other bugs)
Version: unspecified
Hardware: PC All
: P enhancement
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-12 04:26 PDT by Nico Weber
Modified: 2021-10-13 04:45 PDT (History)
5 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Weber 2021-10-12 04:26:30 PDT
http://45.33.8.238/macm1/19741/step_7.txt started failing recently, with this regression range: https://github.com/llvm/llvm-project/compare/52cb3af08c2a...e19bbd0fa2a5

Very likely 962a2479b57f: https://github.com/llvm/llvm-project/commit/962a2479b57f5e0454b472f9c233cda3f89415b1

Not sure if clang-repl does something wrong, or if this is a regression in orcjit.
Comment 1 Nico Weber 2021-10-12 04:27:09 PDT
(https://github.com/llvm/llvm-project/commit/962a2479b57f5e0454b472f9c233cda3f89415b1 doesn't mention a phab review, else I would've commented there.)
Comment 2 Lang Hames 2021-10-12 09:48:00 PDT
Hi Nico,

Thanks for the heads up. I'll look into this today.

-- Lang.
Comment 3 Lang Hames 2021-10-12 13:44:48 PDT
This should be fixed by 2815ed57e3c9.

The failure is probabilistic, so I'll leave this bug open for 24 hours and then review the bot to make sure we haven't seen any more failures.
Comment 4 Lang Hames 2021-10-12 14:49:46 PDT
Looks like I was still missing some calls to ExecutionSession::endSession. I have added these in 19b4e3cfc6a1.
Comment 5 Lang Hames 2021-10-12 15:00:19 PDT
Also missing calls to ExecutorProcessControl::disconnect in some unit tests. This has been fixed in adf55ac66576.
Comment 6 Nico Weber 2021-10-12 18:36:41 PDT
The test is still failing: http://45.33.8.238/macm1/19832/step_7.txt
Comment 7 Nico Weber 2021-10-12 18:37:04 PDT
Consistently, too: http://45.33.8.238/macm1/summary.html

It's been broken all day. Maybe it's time to revert for now?
Comment 8 Lang Hames 2021-10-12 19:34:44 PDT
Oops -- Disregard previous updates, they were for a related but distinct bot failure. :P

I'm looking in to this one now. If getting the bot green tonight is a priority then the test should be disabled, rather than any patches reverted -- there have been quite a few landed since yesterday, and this is likely to be a relatively quick fix.
Comment 9 Lang Hames 2021-10-12 22:23:36 PDT
This was a long-standing bug in JITLink MachO/arm64 that was exposed by the memory manager refactor: negative immediates on LDRLiteral19 relocations weren't being masked, leading to them overwriting opcode bits. The issue had never come up before because LDRLiteral19s were all created inside JITLink itself, and pointed at segments that were (under the old memory manager) always laid out after segments containing the LDRLiteral19 relocation, so we had never encountered a negative immediate before.

This should (finally) be fixed in 447d3017e47 -- I'll check back in on the M1 bot shortly. Apologies again for the earlier noise with the unrelated fixes.
Comment 10 Lang Hames 2021-10-12 23:01:26 PDT
Looks like the the builder is passing again as of http://45.33.8.238/macm1/19846/summary.html.
Comment 11 Nico Weber 2021-10-13 04:45:35 PDT
Fantastic. Thanks, Lang!