[Lldb-commits] [PATCH] dwarf fix for 0-length CIE.

Greg Clayton gclayton at apple.com
Fri Aug 23 10:49:55 PDT 2013


Looks good.

On Aug 23, 2013, at 10:08 AM, Virgile Bello <virgile.bello at gmail.com> wrote:

> Had to apply this patch so that DWARF works properly on executables generated by GCC on Windows (for CIE/FDE, data after the length should not be read if length is 0).
> 
> I suppose this should also apply on other platforms?
> 
> http://llvm-reviews.chandlerc.com/D1487
> 
> Files:
>  source/Symbol/DWARFCallFrameInfo.cpp
> 
> Index: source/Symbol/DWARFCallFrameInfo.cpp
> ===================================================================
> --- source/Symbol/DWARFCallFrameInfo.cpp
> +++ source/Symbol/DWARFCallFrameInfo.cpp
> @@ -341,7 +341,7 @@
>         dw_offset_t next_entry = current_entry + len + 4;
>         dw_offset_t cie_id = m_cfi_data.GetU32 (&offset);
> 
> -        if (cie_id == 0 || cie_id == UINT32_MAX)
> +        if (cie_id == 0 || cie_id == UINT32_MAX || len == 0)
>         {
>             m_cie_map[current_entry] = ParseCIE (current_entry);
>             offset = next_entry;
> <D1487.1.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits




More information about the lldb-commits mailing list