Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

illegal use of GetDelegateFromFunctionPointer causes problems on mono 6.12 #1323

Closed
@benoithudson

Description

@benoithudson

Environment

  • Pythonnet version: master
  • Python version: 3.7 (probably any)
  • Operating System: mono on any platform, not dotnet on any platform

Details

  • Describe what you were trying to get done.

Working on the reload improvements, we find that GetDelegateFromFunctionPointer is sometimes returning weird types that can't be casted to the proper delegate type. This is apparently a known issue in pythonnet on dotnet as well though we haven't hit that problem on that platform:
dotnet/runtime#9074

https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.marshal.getdelegateforfunctionpointer?view=net-5.0
"You can use this method only for pure unmanaged function pointers."

We'd need to change users of NativeCall to make sure they are only calling non-managed functions, or else undefined behaviour can happen.

  • What commands did you run to trigger this issue? If you can provide a

Unit tests for the reload work that@BadSingleton is working on (#1287)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp