[LLVMbugs] [Bug 15665] New: /Support/raw_ostream.cpp:326: void llvm::raw_ostream::copy_to_buffer(const char *, size_t): Assertion `Size <= size_t(OutBufEnd - OutBufCur) && "Buffer overrun!"' failed/

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 3 18:35:20 PDT 2013


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

            Bug ID: 15665
           Summary: /Support/raw_ostream.cpp:326: void
                    llvm::raw_ostream::copy_to_buffer(const char *,
                    size_t): Assertion `Size <= size_t(OutBufEnd -
                    OutBufCur) && "Buffer overrun!"' failed/
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: scherkus at chromium.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Hit this while compiling Chromium code.

I rebased my git patch to trunk and I know there are syntax errors / it
shouldn't compile as-is, however it also shouldn't crash clang :)


../../media/filters/video_frame_stream.cc:59:7: error: no viable conversion
from 'Callback<typename internal::BindState<typename
internal::FunctorTraits<void (class VideoFrameStream::*)(class scoped_
ptr<class VideoDecoderSelector, struct DefaultDeleter<class
VideoDecoderSelector> >, const class scoped_refptr<class VideoDecoder> &, const
class scoped_refptr<class DecryptingDemuxerStream> &)>::Run
nableType, typename internal::FunctorTraits<void (class
VideoFrameStream::*)(class scoped_ptr<class VideoDecoderSelector, struct
DefaultDeleter<class VideoDecoderSelector> >, const class scoped_refpt
r<class VideoDecoder> &, const class scoped_refptr<class
DecryptingDemuxerStream> &)>::RunType, void (typename
internal::CallbackParamTraits<class WeakPtr<class VideoFrameStream>
>::StorageType, type
name internal::CallbackParamTraits<class PassedWrapper<class scoped_ptr<class
VideoDecoderSelector, struct DefaultDeleter<class VideoDecoderSelector> > >
>::StorageType)>::UnboundRunType>' to 'const 
Callback<void (scoped_ptr<class media::VideoDecoder>, const scoped_refptr<class
media::DecryptingDemuxerStream> &)>'
      base::Bind(&VideoFrameStream::OnDecoderSelected, weak_this_,
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/callback.h:447:7: note: candidate constructor (the implicit copy
constructor) not viable: no known conversion from 'base::Callback<typename
internal::BindState<typename internal::FunctorTr
aits<void (VideoFrameStream::*)(scoped_ptr<VideoDecoderSelector,
DefaultDeleter<VideoDecoderSelector> >, const scoped_refptr<VideoDecoder> &,
const scoped_refptr<DecryptingDemuxerStream> &)>::Runnabl
eType, typename internal::FunctorTraits<void
(VideoFrameStream::*)(scoped_ptr<VideoDecoderSelector,
DefaultDeleter<VideoDecoderSelector> >, const scoped_refptr<VideoDecoder> &,
const scoped_refptr<De
cryptingDemuxerStream> &)>::RunType, void (typename
internal::CallbackParamTraits<WeakPtr<VideoFrameStream> >::StorageType,
typename internal::CallbackParamTraits<PassedWrapper<scoped_ptr<VideoDecode
rSelector, DefaultDeleter<VideoDecoderSelector> > >
>::StorageType)>::UnboundRunType>' to 'const base::Callback<void
(scoped_ptr<media::VideoDecoder, base::DefaultDeleter<media::VideoDecoder> >,
cons
t scoped_refptr<media::DecryptingDemuxerStream> &)> &' for 1st argument
class Callback<R(A1, A2)> : public internal::CallbackBase {
      ^
clang:
/usr/local/google/chrome/src/third_party/llvm/lib/Support/raw_ostream.cpp:326:
void llvm::raw_ostream::copy_to_buffer(const char *, size_t): Assertion `Size
<= size_t(OutBufEnd - OutBufCur) &&
 "Buffer overrun!"' failed.
0  clang     0x0000000001e3f545 llvm::sys::PrintStackTrace(_IO_FILE*) + 37
1  clang     0x0000000001e3fa33
2  libc.so.6 0x00007fa560e944a0
3  libc.so.6 0x00007fa560e94425 gsignal + 53
4  libc.so.6 0x00007fa560e97b8b abort + 379
5  libc.so.6 0x00007fa560e8d0ee
6  libc.so.6 0x00007fa560e8d192
7  clang     0x0000000001e54a99 llvm::raw_ostream::write(char const*, unsigned
long) + 505
8  clang     0x00000000010ad3c3
clang::FormatASTNodeDiagnosticArgument(clang::DiagnosticsEngine::ArgumentKind,
long, char const*, unsigned int, char const*, unsigned int,
std::pair<clang::Diagnostics
Engine::ArgumentKind, long> const*, unsigned int, llvm::SmallVectorImpl<char>&,
void*, llvm::ArrayRef<long>) + 3299
9  clang     0x00000000011fff86 clang::Diagnostic::FormatDiagnostic(char
const*, char const*, llvm::SmallVectorImpl<char>&) const + 5366
10 clang     0x00000000006a4a30
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 96
11 clang     0x0000000001202c22
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 546
12 clang     0x00000000011fe944
clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 84
13 clang     0x00000000009c10cd clang::Sema::EmitCurrentDiagnostic(unsigned
int) + 1005
14 clang     0x0000000000bb0796
clang::OverloadCandidateSet::NoteCandidates(clang::Sema&,
clang::OverloadCandidateDisplayKind, llvm::ArrayRef<clang::Expr*>,
llvm::StringRef, clang::SourceLocation) + 
8342
15 clang     0x0000000000b750dd
clang::InitializationSequence::Diagnose(clang::Sema&, clang::InitializedEntity
const&, clang::InitializationKind const&, clang::Expr**, unsigned int) + 7661
16 clang     0x0000000000b702a3
clang::InitializationSequence::Perform(clang::Sema&, clang::InitializedEntity
const&, clang::InitializationKind const&, llvm::MutableArrayRef<clang::Expr*>,
clang::Qua
lType*) + 339
17 clang     0x0000000000b76e39
clang::Sema::PerformCopyInitialization(clang::InitializedEntity const&,
clang::SourceLocation, clang::ActionResult<clang::Expr*, true>, bool, bool) +
249
18 clang     0x0000000000aef086
clang::Sema::GatherArgumentsForCall(clang::SourceLocation,
clang::FunctionDecl*, clang::FunctionProtoType const*, unsigned int,
clang::Expr**, unsigned int, llvm::Smal
lVector<clang::Expr*, 8u>&, clang::Sema::VariadicCallType, bool, bool) + 998
19 clang     0x0000000000aee763
clang::Sema::ConvertArgumentsForCall(clang::CallExpr*, clang::Expr*,
clang::FunctionDecl*, clang::FunctionProtoType const*, clang::Expr**, unsigned
int, clang::SourceL
ocation, bool) + 659
20 clang     0x0000000000bc46cd
clang::Sema::BuildCallToMemberFunction(clang::Scope*, clang::Expr*,
clang::SourceLocation, clang::Expr**, unsigned int, clang::SourceLocation) +
4301
21 clang     0x0000000000ae20d6 clang::Sema::ActOnCallExpr(clang::Scope*,
clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) + 1302
22 clang     0x000000000096f266
clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*,
true>) + 3174
23 clang     0x00000000009726d3 clang::Parser::ParseCastExpression(bool, bool,
bool&, clang::Parser::TypeCastState) + 11987
24 clang     0x000000000096d2d4
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 132
25 clang     0x000000000096d239
clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 9
26 clang     0x000000000099a2bc clang::Parser::ParseExprStatement() + 44
27 clang     0x0000000000999e44
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange
&) + 2404
28 clang     0x0000000000999441
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 145
29 clang     0x00000000009a0431 clang::Parser::ParseCompoundStatementBody(bool)
+ 1729
30 clang     0x00000000009a1c4b
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 187
31 clang     0x000000000093db41
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
2065
32 clang     0x000000000094c99d
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1373
33 clang     0x000000000093d1d8
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 664
34 clang     0x000000000093cc50
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 416
35 clang     0x000000000093c1e0
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2864
36 clang     0x000000000095d02a
clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*,
std::allocator<clan
g::IdentifierInfo*> >&, std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&,
clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) 
+ 474
37 clang     0x000000000095cbca clang::Parser::ParseNamespace(unsigned int,
clang::SourceLocation&, clang::SourceLocation) + 6026
38 clang     0x0000000000948d1f
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 415
39 clang     0x000000000093bd33
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1667
40 clang     0x000000000093b630
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 304
41 clang     0x0000000000937d66 clang::ParseAST(clang::Sema&, bool, bool) + 454
42 clang     0x00000000007f4a12 clang::CodeGenAction::ExecuteAction() + 194
43 clang     0x0000000000688c61 clang::FrontendAction::Execute() + 113
44 clang     0x0000000000669cfd
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 909
45 clang     0x0000000000651ab7
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2983
46 clang     0x00000000006487a5 cc1_main(char const**, char const**, char
const*, void*) + 693
47 clang     0x000000000064edeb main + 7035
48 libc.so.6 0x00007fa560e7f76d __libc_start_main + 237
49 clang     0x0000000000648429
Stack dump:
0.      Program arguments:
/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
video_frame_strea
m.cc -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -relaxed-aliasing
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu
x86-64 -target-linker-version 2.20.1 -momit-l
eaf-frame-pointer -g -coverage-file
/src/chrome/src/out/Debug/obj/media/filters/media.video_frame_stream.o
-resource-dir
/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.3 -d
ependency-file obj/media/filters/media.video_frame_stream.o.d -MT
obj/media/filters/media.video_frame_stream.o -D _FILE_OFFSET_BITS=64 -D
USE_LINUX_BREAKPAD -D DISABLE_NACL -D CHROMIUM_BUILD -D COMPO
NENT_BUILD -D USE_DEFAULT_RENDER_THEME=1 -D USE_LIBJPEG_TURBO=1 -D USE_NSS=1 -D
ENABLE_ONE_CLICK_SIGNIN -D GTK_DISABLE_SINGLE_INCLUDES=1 -D ENABLE_REMOTING=1
-D ENABLE_WEBRTC=1 -D USE_PROPRIETARY_COD
ECS -D ENABLE_CONFIGURATION_POLICY -D ENABLE_INPUT_SPEECH -D
ENABLE_NOTIFICATIONS -D ENABLE_GPU=1 -D ENABLE_EGLIMAGE=1 -D
ENABLE_TASK_MANAGER=1 -D ENABLE_EXTENSIONS=1 -D ENABLE_PLUGIN_INSTALLATION=1 
-D ENABLE_PLUGINS=1 -D ENABLE_SESSION_SERVICE=1 -D ENABLE_THEMES=1 -D
ENABLE_BACKGROUND=1 -D ENABLE_AUTOMATION=1 -D ENABLE_GOOGLE_NOW=1 -D
ENABLE_LANGUAGE_DETECTION=1 -D ENABLE_PRINTING=1 -D ENABLE_C
APTIVE_PORTAL_DETECTION=1 -D ENABLE_MANAGED_USERS=1 -D MEDIA_IMPLEMENTATION -D
USE_NEON -D USE_PULSEAUDIO -D DLOPEN_PULSEAUDIO -D GURL_DLL -D
SK_BUILD_NO_IMAGE_ENCODE -D SK_DEFERRED_CANVAS_USES_GPIPE=1 -D
GR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h" -D GR_AGGRESSIVE_SHADER_OPTS=1
-D SK_ENABLE_INST_COUNT=0 -D SK_USE_POSIX_THREADS -D GR_DLL -D SKIA_DLL -D
U_USING_ICU_NAMESPACE=0 -D __STDC_CONST
ANT_MACROS -D __STDC_FORMAT_MACROS -D DYNAMIC_ANNOTATIONS_ENABLED=1 -D
WTF_USE_DYNAMIC_ANNOTATIONS=1 -D _DEBUG -D _REENTRANT -I
../../third_party/icu/public/common -I ../../third_party/icu/public/i18
n -I ../.. -I gen/pulse -I ../../net/third_party/nss/ssl -I ../../skia/config
-I ../../third_party/skia/src/core -I ../../third_party/skia/include/config -I
../../third_party/skia/include/core -I ../
../third_party/skia/include/effects -I ../../third_party/skia/include/pdf -I
../../third_party/skia/include/gpu -I ../../third_party/skia/include/gpu/gl -I
../../third_party/skia/include/pipe -I ../.
./third_party/skia/include/ports -I ../../third_party/skia/include/utils -I
../../skia/ext -I ../../third_party/opus/src/include -I gen/ffmpeg -I
../../third_party/ffmpeg/chromium/config/ChromeOS/lin
ux/x64 -I ../../third_party/ffmpeg -I ../../third_party/libvpx/source/libvpx -I
/usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I
/usr/include/nss -I /usr/include/nspr -I /usr/in
clude/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I
/usr/include/gtk-2.0 -I /usr/lib/x86_64-linux-gnu/gtk-2.0/include -I
/usr/include/atk-1.0 -I /usr/include/cairo -I /usr/include/gdk-pix
buf-2.0 -I /usr/include/pango-1.0 -I /usr/include/gio-unix-2.0/ -I
/usr/include/pixman-1 -I /usr/include/freetype2 -I /usr/include/libpng12
-internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.6/../../.
./../include/c++/4.6 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/b
ackward -internal-isystem /usr/local/include -internal-isystem
/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.3/include
-internal-externc-isystem /usr/include/x86_64-linux-
gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include
-O0 -Werror -Wall -Wno-unused-parameter -Wno-missing-field-initializers
-Wheader-hygiene -Wno-unused-function -Wno-char-s
ubscripts -Wno-unnamed-type-template-args -Wno-c++11-extensions
-Wno-covered-switch-default -Wstring-conversion -Wsign-compare
-fdeprecated-macro -fdebug-compilation-dir /src/chrome/src/out/Debug -fe
rror-limit 19 -fmessage-length 0 -fvisibility hidden
-fvisibility-inlines-hidden -pthread -stack-protector 1
-stack-protector-buffer-size 4 -mstackrealign -fno-rtti -fno-threadsafe-statics
-fobjc-run
time=gcc -fdiagnostics-show-option -fcolor-diagnostics -backend-option
-vectorize-loops -load
/src/chrome/src/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstru
cts.so -add-plugin find-bad-constructs -plugin-arg-find-bad-constructs
skip-virtuals-in-implementations -o
obj/media/filters/media.video_frame_stream.o -x c++
../../media/filters/video_frame_stream.c
c 
1.      ../../media/filters/video_frame_stream.cc:60:50: current parser token
')'
2.      ../../media/filters/video_frame_stream.cc:18:1: parsing namespace
'media'
3.      ../../media/filters/video_frame_stream.cc:36:58: parsing function body
'Initialize'
4.      ../../media/filters/video_frame_stream.cc:36:58: in compound statement
('{}')
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130404/c151a5ae/attachment.html>


More information about the llvm-bugs mailing list