Skip to content

H5E.walk_t should have err_desc marked with [In] attribute? #154

@marklam

Description

@marklam

When using a stack walking function in a debug build, the CLR terminates the app due to heap corruption.

I think it's a side-effect of marshalling the error_t structure. If the definition of walk_t is changed to add the [In] attribute to err_desc:

        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        public delegate herr_t walk_t
             (
             uint n,
             [In]ref H5E.error_t err_desc,
             IntPtr client_data
             );

then the stack-walking completes successfully.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions