[llvm] [llvm-objdump][ELF]Fix crash when reading strings from .dynstr (PR #125679)
    Ruoyu Qiu via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sun Feb 23 17:44:42 PST 2025
    
    
  
================
@@ -63,14 +63,22 @@ static Expected<StringRef> getDynamicStrTab(const ELFFile<ELFT> &Elf) {
   if (!DynamicEntriesOrError)
     return DynamicEntriesOrError.takeError();
 
+  typename ELFT::Xword StringTableSize{0};
----------------
cabbaken wrote:
> `typename ELFT::Xword StringTableSize = 0;`
I got error with this code.
```
No viable conversion from 'int' to 'typename ELFType<llvm::endianness::little, false>::Xword' (aka 'packed_endian_specific_integral<unsigned long, (llvm::endianness)1, 1>')
```
https://github.com/llvm/llvm-project/pull/125679
    
    
More information about the llvm-commits
mailing list