Skip to content

wasm_name_new_from_string should not have +1 since rust strings are not null terminated. #2131

@craigsteyn

Description

@craigsteyn
wasm_name_t nameWrong;
wasm_name_new_from_string(&nameWrong, "hello");
wasm_name_t nameRight;
wasm_name_new(&nameRight, strlen("hello"), "hello");

first one didnt work when adding to the linker.
second one did.
Issue was caused by wasm_name_new_from_string adding to the length.

Metadata

Metadata

Assignees

Labels

bugIncorrect behavior in the current implementation that needs fixing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions