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:
@ -822,7 +822,9 @@ load_custom_section(const uint8 *buf, const uint8 *buf_end, AOTModule *module,
|
||||
case AOT_CUSTOM_SECTION_NAME:
|
||||
if (!load_name_section(buf, buf_end, module, is_load_from_file_buf,
|
||||
error_buf, error_buf_size))
|
||||
goto fail;
|
||||
LOG_VERBOSE("Load name section failed.");
|
||||
else
|
||||
LOG_VERBOSE("Load name section success.");
|
||||
break;
|
||||
#if WASM_ENABLE_LOAD_CUSTOM_SECTION != 0
|
||||
case AOT_CUSTOM_SECTION_RAW:
|
||||
|
||||
Reference in New Issue
Block a user