David Blaikie via llvm-dev
2015-Aug-21 20:39 UTC
[llvm-dev] Canonical representation for empty lists in debug info metadata
While checking for serialization/deserialization without using pointee types, I've come across a few test cases that crash at head, without my debugging assertions for accessing pointee types. One of them is test/Transforms/StripSymbols/2010-06-30-StripDebug.ll Its retainedTypes metadata points to a metadata array of a single null element. This crashes the dyn_cast (because it's not a dyn_cast_or_null) Verifier.cpp:3785 Do you have a preferred/canonical representation intended in this case - an extant, but zero-length list, or no list at all? I tend to prefer no list at all, just because it simplifies reading of the debug info. Rather than seeing a "retainedTypes" property, following it to the metadata, only to find it's zero-length? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150821/7dd1eec1/attachment.html>
Duncan P. N. Exon Smith via llvm-dev
2015-Aug-21 23:54 UTC
[llvm-dev] Canonical representation for empty lists in debug info metadata
> On 2015-Aug-21, at 13:39, David Blaikie <dblaikie at gmail.com> wrote: > > While checking for serialization/deserialization without using pointee types, I've come across a few test cases that crash at head, without my debugging assertions for accessing pointee types. > > One of them is test/Transforms/StripSymbols/2010-06-30-StripDebug.ll > > Its retainedTypes metadata points to a metadata array of a single null element. > > This crashes the dyn_cast (because it's not a dyn_cast_or_null) Verifier.cpp:3785The Verifier should crash in any case, it should just fail.> Do you have a preferred/canonical representation intended in this case - an extant, but zero-length list, or no list at all? I tend to prefer no list at all, just because it simplifies reading of the debug info. Rather than seeing a "retainedTypes" property, following it to the metadata, only to find it's zero-length?I agree: no list at all is better.
David Blaikie via llvm-dev
2015-Aug-22 22:39 UTC
[llvm-dev] Canonical representation for empty lists in debug info metadata
On Fri, Aug 21, 2015 at 4:54 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote:> > > On 2015-Aug-21, at 13:39, David Blaikie <dblaikie at gmail.com> wrote: > > > > While checking for serialization/deserialization without using pointee > types, I've come across a few test cases that crash at head, without my > debugging assertions for accessing pointee types. > > > > One of them is test/Transforms/StripSymbols/2010-06-30-StripDebug.ll > > > > Its retainedTypes metadata points to a metadata array of a single null > element. > > > > This crashes the dyn_cast (because it's not a dyn_cast_or_null) > Verifier.cpp:3785 > > The Verifier should crash in any case, it should just fail. >r245795> Do you have a preferred/canonical representation intended in this case - > an extant, but zero-length list, or no list at all? I tend to prefer no > list at all, just because it simplifies reading of the debug info. Rather > than seeing a "retainedTypes" property, following it to the metadata, only > to find it's zero-length? > > I agree: no list at all is better.r245796 Thanks! - Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150822/904e18eb/attachment.html>