[LLVMbugs] [Bug 12481] New: Assertion `ExprCleanupObjects.size() >= FirstCleanup' failed in SemaExprCXX.cpp

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Apr 6 07:58:13 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=12481

             Bug #: 12481
           Summary: Assertion `ExprCleanupObjects.size() >= FirstCleanup'
                    failed in SemaExprCXX.cpp
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: glider at google.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8335
  --> http://llvm.org/bugs/attachment.cgi?id=8335
Minimal reproducer

See the attached repro.


$ Release+Asserts/bin/clang++ convolver.second.cc -c 
convolver.second.cc:13:130: error: no template named '__is_integer'; did you
mean '__is_pointer'?
                                                        template<typename _Tp> 
   struct __is_arithmetic     : public __traitor<__is_integer<_Tp>,
__is_floating<_Tp> >     {
                                                                               
                                                 ^~~~~~~~~~~~
                                                                               
                                                 __is_pointer
convolver.second.cc:7:91: note: '__is_pointer' declared here
                                                        template<typename _Tp> 
   struct __is_pointer     {
                                                                               
          ^
convolver.second.cc:16:44: error: C++ requires a type specifier for all
declarations
                                           __value = 1 };
                                           ^~~~~~~
convolver.second.cc:16:52: warning: in-class initialization of non-static data
member is a C++11 extension [-Wc++11-extensions]
                                           __value = 1 };
                                                   ^
convolver.second.cc:16:55: error: expected ';' at end of declaration list
                                           __value = 1 };
                                                      ^
                                                      ;
convolver.second.cc:22:44: error: expected ';' after struct
                                          }
                                           ^
                                           ;
convolver.second.cc:34:85: error: unknown template name 'iterator'
                                          struct _Bit_iterator_base   : public
std::iterator<std::random_access_iterator_tag, bool>   {
                                                                               
    ^
convolver.second.cc:34:127: error: expected class name
                                          struct _Bit_iterator_base   : public
std::iterator<std::random_access_iterator_tag, bool>   {
                                                                               
                                              ^
convolver.second.cc:36:38: error: expected ';' after struct
                                    }
                                     ^
                                     ;
convolver.second.cc:65:235: error: expected '}'
  ...ConvolveVertically_SSE2<false>(filter_values, filter_length,              
                         first_row_for_filter,                                 
      filter_x.num_values(), cur_output_row); 
                                                                               
                                                                               
                                             ^
convolver.second.cc:41:63: note: to match this '{'
                                   struct ConvolutionFilter1D {
                                                              ^
convolver.second.cc:65:235: error: expected ';' after struct
  ...ConvolveVertically_SSE2<false>(filter_values, filter_length,              
                         first_row_for_filter,                                 
      filter_x.num_values(), cur_output_row); 
                                                                               
                                                                               
                                             ^
                                                                               
                                                                               
                                             ;
convolver.second.cc:65:235: error: expected '}'
convolver.second.cc:37:94: note: to match this '{'
                                          struct _Bit_iterator : public
_Bit_iterator_base   {
                                                                               
             ^
convolver.second.cc:49:39: error: expected ';' in 'for' statement specifier
                            out_x += 4) {
                                      ^
convolver.second.cc:50:49: error: use of undeclared identifier 'width'
                               for (int out_x = width;
                                                ^
convolver.second.cc:51:35: error: expected ';' in 'for' statement specifier
                           out_x++) {
                                  ^
convolver.second.cc:56:32: error: expected ')'
                               }
                               ^
convolver.second.cc:52:57: note: to match this '('
                                 accum0 = __extension__ ({
                                                        ^
convolver.second.cc:56:33: error: expected ';' after expression
                               }
                                ^
                                ;
convolver.second.cc:65:235: error: expected '}'
  ...ConvolveVertically_SSE2<false>(filter_values, filter_length,              
                         first_row_for_filter,                                 
      filter_x.num_values(), cur_output_row); 
                                                                               
                                                                               
                                             ^
convolver.second.cc:46:354: note: to match this '{'
  ...int filter_length,                              unsigned char* const*
source_data_rows,                              int pixel_width,                
             unsigned char* out_row) {
                                                                               
                                                                               
                                ^
convolver.second.cc:61:98: error: no member named 'FilterForValue' in
'__gnu_cxx::std::_Bit_iterator::ConvolutionFilter1D'
                                const ConvolutionFilter1D::Fixed* filter_values
=       filter_y.FilterForValue(0, &filter_offset, &filter_length);
                                                                               
        ~~~~~~~~ ^
convolver.second.cc:62:72: error: use of undeclared identifier 'out_y'
                               unsigned char* cur_output_row = &output[out_y *
output_byte_row_stride];
                                                                       ^
convolver.second.cc:63:86: error: use of undeclared identifier
'rows_to_convolve'
                               unsigned char* const* first_row_for_filter =    
    &rows_to_convolve[filter_offset - first_row_in_circular_buffer];
                                                                               
     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
clang:
/usr/local/google/asan/asan-llvm-trunk/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp:4576:
clang::Expr* clang::Sema::MaybeCreateExprWithCleanups(clang::Expr*): Assertion
`ExprCleanupObjects.size() >= FirstCleanup' failed.
0  clang           0x0000000001e3e69f
1  clang           0x0000000001e40622
2  libpthread.so.0 0x00007f7b056e78f0
3  libc.so.6       0x00007f7b049d6a75 gsignal + 53
4  libc.so.6       0x00007f7b049da5c0 abort + 384
5  libc.so.6       0x00007f7b049cf941 __assert_fail + 241
6  clang           0x0000000000afac10
clang::Sema::MaybeCreateExprWithCleanups(clang::Expr*) + 176
7  clang           0x0000000000afb0a1
clang::Sema::MaybeCreateExprWithCleanups(clang::ActionResult<clang::Expr*,
true>) + 33
8  clang           0x0000000000afd51d
clang::Sema::ActOnFinishFullExpr(clang::Expr*) + 189
9  clang           0x0000000000c5f5ad
10 clang           0x0000000000c60f53
11 clang           0x0000000000c5f1cd
12 clang           0x0000000000c61949
13 clang           0x0000000000c5f20d
14 clang           0x0000000000c60f53
15 clang           0x0000000000c5f1cd
16 clang           0x0000000000c61949
17 clang           0x0000000000c5f20d
18 clang           0x0000000000c60f53
19 clang           0x0000000000c5f1cd
20 clang           0x0000000000c625df clang::Sema::SubstStmt(clang::Stmt*,
clang::MultiLevelTemplateArgumentList const&) + 79
21 clang           0x0000000000c73ba2
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 1138
22 clang           0x0000000000c7345f
clang::Sema::PerformPendingInstantiations(bool) + 559
23 clang           0x0000000000997b3a clang::Sema::ActOnEndOfTranslationUnit()
+ 378
24 clang           0x000000000091d1d6
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 694
25 clang           0x0000000000913e5d clang::ParseAST(clang::Sema&, bool) + 285
26 clang           0x00000000007b28d4 clang::CodeGenAction::ExecuteAction() +
68
27 clang           0x000000000065cd11
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 321
28 clang           0x0000000000645f74
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1348
29 clang           0x000000000063be40 cc1_main(char const**, char const**, char
const*, void*) + 944
30 clang           0x0000000000644d79 main + 7241
31 libc.so.6       0x00007f7b049c1c4d __libc_start_main + 253
32 clang           0x00000000006398b9
Stack dump:
0.    Program arguments:
/usr/local/google/asan/asan-llvm-trunk/llvm/build/Release+Asserts/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name convolver.second.cc -mrelocation-model static -mdisable-fp-elim
-masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64
-momit-leaf-frame-pointer -coverage-file convolver.second.o -resource-dir
/usr/local/google/asan/asan-llvm-trunk/llvm/build/Release+Asserts/bin/../lib/clang/3.1
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/local/google/asan/asan-llvm-trunk/llvm/build/Release+Asserts/bin/../lib/clang/3.1/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdeprecated-macro -fdebug-compilation-dir
/usr/local/google/asan/asan-llvm-trunk/llvm/build -ferror-limit 19
-fmessage-length 211 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fobjc-fragile-abi -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o convolver.second.o -x c++
convolver.second.cc 
1.    <eof> parser at end of file
2.    convolver.second.cc:46:65: instantiating function definition
'ConvolveVertically_SSE2'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/convolver-XrgICO.ii
clang: note: diagnostic msg: /tmp/convolver-XrgICO.sh

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list