This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] bugfix: ApplyDebugLocation goes out of scope before intended
ClosedPublic

Authored by usama54321 on Jan 20 2023, 11:39 AM.

Details

Summary

ApplyDebugLocation goes out of scope at the end of the conditional branch which is a bug. This causes a crash in the test added in the patch.

rdar://103570533

Diff Detail

Event Timeline

usama54321 created this revision.Jan 20 2023, 11:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2023, 11:39 AM
usama54321 requested review of this revision.Jan 20 2023, 11:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2023, 11:39 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
usama54321 edited the summary of this revision. (Show Details)Jan 20 2023, 11:39 AM
usama54321 added a reviewer: aprantl.

Code LGTM, it would be nice if we could further reduce the test case.

clang/test/CodeGenObjC/objc-arc-ubsan-debugging.m
3

Could you get by with just defining NSObject inline and forward-declaring NSString? Including Foundation.h is very expensive.

Removing unnecessary code from test

usama54321 marked an inline comment as done.Jan 20 2023, 12:54 PM

The libcxx test failure seems unrelated and seems to be failing on master
https://buildkite.com/llvm-project/libcxx-ci/builds?branch=master

aprantl accepted this revision.Jan 24 2023, 12:14 PM
This revision is now accepted and ready to land.Jan 24 2023, 12:14 PM
This revision was landed with ongoing or failed builds.Jan 24 2023, 3:32 PM
This revision was automatically updated to reflect the committed changes.