Skip to content

Edge case occurs in store analysis of vtable assignment when using std::function #1751

@FXTi

Description

@FXTi

In function _ZNSt3__h10__function6__funcIZN4OHOS9DataShare19NapiDataShareHelper15SetSilentSwitchEP10napi_env__P20napi_callback_info__bE4$45NS_9allocatorIS9_EEFvPNS3_9AsyncCall7ContextEEEC2B6v15004EOS9_OSB:

entry:
  call void @llvm.dbg.value(metadata ptr %this, metadata !247376, metadata !DIExpression()), !dbg !247377
  call void @llvm.dbg.value(metadata ptr %__f, metadata !247378, metadata !DIExpression()), !dbg !247377
  call void @llvm.dbg.value(metadata ptr %__a, metadata !247379, metadata !DIExpression()), !dbg !247377
  %call = call noundef ptr @_ZNSt3__h10__function6__baseIFvPN4OHOS9DataShare9AsyncCall7ContextEEEC2B6v15004Ev(ptr noundef nonnull align 4 dereferenceable(4) %this) #26, !dbg !247380
  store ptr getelementptr inbounds ({ [9 x ptr] }, ptr @"_ZTVNSt3__h10__function6__funcIZN4OHOS9DataShare19NapiDataShareHelper15SetSilentSwitchEP10napi_env__P20napi_callback_info__bE4$_45NS_9allocatorIS9_EEFvPNS3_9AsyncCall7ContextEEEE", i32 0, inrange i32 0, i32 2), ptr %this, align 4, !dbg !247381
  %__f_ = getelementptr inbounds %"class.std::__h::__function::__func.1983", ptr %this, i32 0, i32 1, !dbg !247382
  %call2 = invoke noundef ptr @"_ZNSt3__h10__function12__alloc_funcIZN4OHOS9DataShare19NapiDataShareHelper15SetSilentSwitchEP10napi_env__P20napi_callback_info__bE4$_45NS_9allocatorIS9_EEFvPNS3_9AsyncCall7ContextEEEC2B6v15004EOS9_OSB_"(ptr noundef nonnull align 4 dereferenceable(8) %__f_, ptr noundef nonnull align 4 dereferenceable(8) %__f, ptr noundef nonnull align 1 dereferenceable(1) %__a) #26
          to label %invoke.cont unwind label %lpad, !dbg !247382

Store instruction has %this as operand, which is wired but reasonable.

BC here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions