Skip to content

Using IMetaDataEmit::DeleteToken causes the runtime to hang #114306

Closed
@urisimchoni

Description

@urisimchoni

I have a .Net profiler (using the native profiler interface). I'm able to instrument code and and use IMetaDataEmit interface to create tokens (e.g. TypeRefs and MemberRefs). However when I try to use DeleteToken() to delete an assembly-scoped custom attribute the program hangs. I tried this from various callbacks (module load finished, assembly load finished, JITStarted) - all resulting the same.

I find the custom attribute token by enumerating custom attribute, close the enumerator, and then try the DeleteToken(), and the runtime hangs.

This happens in all runtime versions I've checked. Probably I'm doing something wrong here, but before providing a full reproducer I'd like to know whether there are known limitations to DeleteToken() or maybe there are better approaches to deleting custom attributes at runtime.

Thanks,
Uri.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Diagnostics-coreclrneeds-author-actionAn issue or pull request that requires more info or actions from the author.no-recent-activityquestionAnswer questions and provide assistance, not an issue with source code or documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions