[llvm] r174304 - PR15149: crash when printing debug info metadata containing an invalid language spec

David Blaikie dblaikie at gmail.com
Tue Apr 16 20:43:32 PDT 2013


Addressed both the missing test case and hex printing suggestion in r174664

On Thu, Mar 28, 2013 at 3:39 PM, Robinson, Paul
<Paul.Robinson at am.sony.com> wrote:
> Or have LanguageString() return hex if it's not a known code?
> The committee does define new ones from time to time, and then
> there's always the user-defined range (which is handled poorly
> right now).
> --paulr
>
>
>> -----Original Message-----
>> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
>> bounces at cs.uiuc.edu] On Behalf Of Rafael EspĂ­ndola
>> Sent: Thursday, March 28, 2013 11:19 AM
>> To: David Blaikie
>> Cc: llvm-commits at cs.uiuc.edu
>> Subject: Re: [llvm] r174304 - PR15149: crash when printing debug info
>> metadata containing an invalid language spec
>>
>> testcase?
>>
>> On 3 February 2013 21:31, David Blaikie <dblaikie at gmail.com> wrote:
>> > Author: dblaikie
>> > Date: Sun Feb  3 23:31:37 2013
>> > New Revision: 174304
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=174304&view=rev
>> > Log:
>> > PR15149: crash when printing debug info metadata containing an invalid
>> language spec
>> >
>> > Modified:
>> >     llvm/trunk/lib/IR/DebugInfo.cpp
>> >
>> > Modified: llvm/trunk/lib/IR/DebugInfo.cpp
>> > URL: http://llvm.org/viewvc/llvm-
>> project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=174304&r1=174303&r2=174304&v
>> iew=diff
>> >
>> ========================================================================
>> ======
>> > --- llvm/trunk/lib/IR/DebugInfo.cpp (original)
>> > +++ llvm/trunk/lib/IR/DebugInfo.cpp Sun Feb  3 23:31:37 2013
>> > @@ -1058,8 +1058,8 @@ void DIScope::printInternal(raw_ostream
>> >
>> >  void DICompileUnit::printInternal(raw_ostream &OS) const {
>> >    DIScope::printInternal(OS);
>> > -  if (unsigned Lang = getLanguage())
>> > -    OS << " [" << dwarf::LanguageString(Lang) << ']';
>> > +  if (const char *Lang = dwarf::LanguageString(getLanguage()))
>> > +    OS << " [" << Lang << ']';
>> >  }
>> >
>> >  void DIEnumerator::printInternal(raw_ostream &OS) const {
>> >
>> >
>> > _______________________________________________
>> > llvm-commits mailing list
>> > llvm-commits at cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list