[PATCH] D101353: [DebugInfo] do not add pc value if lsda value in fde is 0

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 27 11:36:24 PDT 2021


rafauler added a comment.

Hi @dongAxis1944, thanks for submitting this!

> But the LDSA value is zero in FDE, in this case llvm should set lsda value to 0 even if LSDA is relative to pc.

I don't understand why is zero special? We know it looks wrong because no LSDA would ever be encoded with a zero offset from the current address. But in that logic, 1 or 2 is also wrong, and so on. This looks like a special case to account for a bug in the compiler, is that right? What is the compiler that is generating that and why? It would be good to get to the bottom of that before special casing the parser library.

I'm saying this because if the violating FDE entry with LSDA set to 0 is being generated by source code written in assembly language that just happens to be coded by someone writing incorrect FDE metadata, it seems wrong to adapt the parser library to swallow that mistake -- and the source code should be fixed instead.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101353/new/

https://reviews.llvm.org/D101353



More information about the llvm-commits mailing list