[cfe-commits] r69165 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/SemaObjC/scope-check-try-catch.m

Chris Lattner clattner at apple.com
Wed Apr 15 09:55:13 PDT 2009


On Apr 15, 2009, at 9:51 AM, Fariborz Jahanian wrote:

> I am seeing lots of crashes like this:
>
> build/Objects-normal/x86_64/IBViewEditorWindowController.o
> Assertion failed: (0 < OldLabelID && OldLabelID <= LabelIDList.size()
> && "Old label ID out of range."), function RemapLabel, file /Volumes/
> sandbox/llvm/include/llvm/CodeGen/MachineModuleInfo.h, line 189.

This is related to a different bad patch of Devang's.  Devang, can you  
please revert the patch until it is working again?

-Chris

>
> 0   clang-cc          0x00d943d3 _ZL15PrintStackTracePv + 45
> 1   clang-cc          0x00d94945 _ZL13SignalHandleri + 351
> 2   libSystem.B.dylib 0x9107eadb _sigtramp + 43
> 3   libSystem.B.dylib 0xffffffff _sigtramp + 1861752143
> 4   libSystem.B.dylib 0x910f9a33 raise + 26
> 5   libSystem.B.dylib 0x9110daab abort + 93
> 6   libSystem.B.dylib 0x910fbb6a __assert_rtn + 252
> 7   clang-cc          0x00aa2e80
> llvm::MachineModuleInfo::RemapLabel(unsigned int, unsigned int) + 98
> 8   clang-cc          0x00aa16f4
> llvm::DebugLabelFolder::runOnMachineFunction(llvm::MachineFunction&) +
> 304
> 9   clang-cc          0x00a89752
> llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 64
> 10  clang-cc          0x00d1f3d6
> llvm::FPPassManager::runOnFunction(llvm::Function&) + 288
> 11  clang-cc          0x00d1f8f8
> llvm::FunctionPassManagerImpl::run(llvm::Function&) + 112
> 12  clang-cc          0x00d1fac8
> llvm::FunctionPassManager::run(llvm::Function&) + 156
> 13  clang-cc          0x0003ee92 (anonymous
> namespace)::BackendConsumer::EmitAssembly() + 812
> 14  clang-cc          0x0003ef83 (anonymous
> namespace)::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
> + 151
> 15  clang-cc          0x001b981f clang::ParseAST(clang::Preprocessor&,
> clang::ASTConsumer*, clang::ASTContext&, bool, bool) + 463
> 16  clang-cc          0x0007c998
> _ZL16ProcessInputFileRN5clang12PreprocessorERNS_19PreprocessorFactoryERKSs11ProgActions
>  + 3027
> 17  clang-cc          0x0008043c main + 2334
> 18  clang-cc          0x0002ea69 start + 53
> Stack dump:
>
> Can we remove this patch, if it is causing it?
>
> - Thanks, Fariborz
>
> On Apr 15, 2009, at 9:45 AM, steve naroff wrote:
>
>>
>> On Apr 15, 2009, at 12:08 PM, Eli Friedman wrote:
>>
>>> On Wed, Apr 15, 2009 at 7:38 AM, Steve Naroff <snaroff at apple.com>
>>> wrote:
>>>> Author: snaroff
>>>> Date: Wed Apr 15 09:38:36 2009
>>>> New Revision: 69165
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=69165&view=rev
>>>> Log:
>>>> Fix <rdar://problem/6791490> [clang10 regression] [sema] invalid
>>>> illegal jump diagnostic.
>>>>
>>>> caused by: <rdar://problem/6252084> [sema] jumps into Obj-C
>>>> exception blocks should be disallowed.
>>>
>>> Ah, hmm, I figured there was a problem like this; I didn't reply
>>> earlier because I didn't get a chance to test.
>>>
>>>> Sema::RecursiveCalcLabelScopes() and
>>>> Sema::RecursiveCalcJumpScopes() need to pop the ScopeStack within
>>>> the statement iteration loop (was outside the loop).
>>>
>>> That looks very wrong... if I'm not mistaken, the following testcase
>>> breaks.
>>>
>>> int test4(int x) {
>>> goto L; // expected-error{{illegal jump}}
>>> int a[x];
>>> test4(x);
>>> L:
>>> return sizeof a;
>>> }
>>>
>>> The correct solution is to use the correct parent in the  
>>> PopScopeMap,
>>> which for an @try is either the @try itself or the containing
>>> ObjCAtTryStmt.
>>>
>>
>> O.k. I'll take a look. I'll also add the test case above (which would
>> have been helpful).
>>
>> Thanks,
>>
>> snaroff
>>
>>> -Eli
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list