Hello everyone!
Thank you for your time! I am an intern at a chip company, and I suspect that I might have encountered a potential bug in a specific version of LLVM (18.0.0)
Whenever I execute the update section method of llvm-objcopy (which replaces the contents of a specific section) on an aarch64 architecture .o file under an environment with address sanitizer, I encounter a ‘heap use after free’ error. It seems that the memory allocation, deallocation, and subsequent access are all concentrated within the llvm::objcopy::executeObjcopyOnBinary
function.
This issue occurs both when calling the update section-related API in the code and when using the command line to perform the update section in the terminal. Therefore, I suspect the problem might exist within the LLVM source code.
I checked the LLVM version I am using, which is 18.0.0. However, I noticed that the official source no longer provides the code for version 18.0.0. Could it be that the code for version 18.0.0 has been discontinued due to instability?" Should I consider switching from LLVM version 18.0.0 to a newer version for my development environment?