Fix a bug when emit the custom name section to aot file (#2987)
The content in custom name section is changed after loaded since the strings are adjusted with '\0' appended, the emitted AOT file then cannot be loaded. The PR disables changing the content for AOT compiler to resolve it. And disable emitting custom name section for `wamrc --enable-dump-call-stack`, instead, use `wamrc --emit-custom-sections=name` to emit it.
This commit is contained in:
@ -2679,8 +2679,12 @@ handle_name_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module,
|
||||
if (!(module->functions[func_index]->field_name =
|
||||
const_str_list_insert(
|
||||
p, func_name_len, module,
|
||||
is_load_from_file_buf, error_buf,
|
||||
error_buf_size))) {
|
||||
#if WASM_ENABLE_WAMR_COMPILER != 0
|
||||
false,
|
||||
#else
|
||||
is_load_from_file_buf,
|
||||
#endif
|
||||
error_buf, error_buf_size))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user