dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.09k stars 1.56k forks source link

Core dump #744

Closed peter-ahe-google closed 9 years ago

peter-ahe-google commented 12 years ago

$ git svn info Path: . URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/frog Repository Root: https://dart.googlecode.com/svn Repository UUID: 260f80e4-7a28-3924-810f-c04153c831b5 Revision: 2248 Node Kind: directory Schedule: normal Last Changed Author: Peter von der Ahé Last Changed Rev: 2248 Last Changed Date: 2011-12-08 15:17:04 +0100 (Thu, 08 Dec 2011)

$ gdb xcodebuild/Release_ia32/dart /cores/core.18603 GNU gdb 6.3.50-20050815 (Apple version gdb-1472) (Wed Jul 21 10:53:12 UTC 2010) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .... done

Core was generated by `xcodebuild/Release_ia32/dart'. Reading symbols for shared libraries . done Reading symbols for shared libraries .... done

­0 0x00123a69 in dart::StackFrame::GetCallerFp (this=0xbfffd7a0) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/stack_frame_ia32.cc:42

42 uword StackFrame::GetCallerFp() const {

(gdb) t a a bt

Thread 2 (core thread 1):

­0 0x9009768e in poll$UNIX2003 ()

­1 0x000280fc in EventHandlerImplementation::Poll (args=0x401410) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/bin/eventhandler_macos.cc:347

­2 0x90031259 in _pthread_start ()

­3 0x900310de in thread_start ()

Thread 1 (core thread 0):

­0 0x00123a69 in dart::StackFrame::GetCallerFp (this=0xbfffd7a0) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/stack_frame_ia32.cc:42

­1 0x001232ac in dart::StackFrameIterator::FrameSetIterator::NextFrame () at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/stack_frame.cc:162

­2 0x001232ac in dart::StackFrameIterator::NextFrame (this=0xbfffd778) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/stack_frame.cc:146

­3 0x000a286e in FindExceptionHandler [inlined]() at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/exceptions.cc:38

­4 0x000a286e in dart::ThrowExceptionHelper (exception=@0xbfffdcac, existing_stacktrace=@0xbfffdcb4) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/exceptions.cc:58

­5 0x000a2d35 in dart::Exceptions::Throw (exception=@0xbfffdcac) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/exceptions.cc:104

­6 0x0007b979 in dart::DRTThrow (arguments={isolate = 0x812600, argc = 1, argv = 0xbfffdf00, retval_ = 0xbfffdf04}) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/code_generator.cc:354

­7 0x00540062 in ?? ()

­8 0x3fd8fa88 in ?? ()

­9 0x007b29c7 in ?? ()

­10 0x007b94dd in ?? ()

­11 0x007aee89 in ?? ()

­12 0x3fd8cb5d in ?? ()

Previous frame inner to this frame (gdb could not unwind past this frame)

peter-ahe-google commented 12 years ago

Re-ran on the debug VM and got this assertion:

dart/runtime/vm/stack_frame.cc:56: error: expected: !function.IsNull()

GNU gdb 6.3.50-20050815 (Apple version gdb-1472) (Wed Jul 21 10:53:12 UTC 2010) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .... done

Core was generated by `xcodebuild/Debug_ia32/dart'. Reading symbols for shared libraries . done Reading symbols for shared libraries .... done

­0 0x90064c5a in __kill ()

(gdb) t a a bt

Thread 2 (core thread 1):

­0 0x9009768e in poll$UNIX2003 ()

­1 0x00025789 in EventHandlerImplementation::Poll (args=0x501450) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/bin/eventhandler_macos.cc:346

­2 0x90031259 in _pthread_start ()

­3 0x900310de in thread_start ()

Thread 1 (core thread 0):

­0 0x90064c5a in __kill ()

­1 0x90064c4c in kill$UNIX2003 ()

­2 0x900f75a5 in raise ()

­3 0x9010d6e4 in abort ()

­4 0x000025ef in dart::DynamicAssertionHelper::Fail (this=0xbfffd678, format=0x117c20 "expected: %s") at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/assert.cc:39

­5 0x000f8855 in dart::DartFrame::FindExceptionHandler (this=0xbfffd704, handler_pc=0xbfffd7b8) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/stack_frame.cc:56

­6 0x00081d6f in dart::FindExceptionHandler (handler_pc=0xbfffd7b8, handler_sp=0xbfffd7b4, handler_fp=0xbfffd7b0, stack_frame_pcs=0xbfffd78c) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/exceptions.cc:32

­7 0x00081f10 in dart::ThrowExceptionHelper (exception=@0xbfffdcac, existing_stacktrace=@0xbfffdcb4) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/exceptions.cc:58

­8 0x00082150 in dart::Exceptions::Throw (exception=@0xbfffdcac) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/exceptions.cc:104

­9 0x0006071c in dart::DRTHelperThrow (isolate=0x812600, arguments={isolate = 0x812600, argc = 1, argv = 0xbfffdef0, retval_ = 0xbfffdef4}) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/code_generator.cc:354

­10 0x0006088a in dart::DRTThrow (arguments={isolate = 0x812600, argc = 1, argv = 0xbfffdef0, retval_ = 0xbfffdef4}) at /Users/ahe/Dart/all/dart.googlecode.com/dart/runtime/vm/code_generator.cc:351

­11 0x00480062 in ?? ()

­12 0x3ff1b056 in ?? ()

­13 0x3f879a75 in ?? ()

­14 0x3ff0189a in ?? ()

­15 0x3f875686 in ?? ()

­16 0x3ff17b6b in ?? ()

Previous frame inner to this frame (gdb could not unwind past this frame) (gdb)

ghost commented 12 years ago

Please explain how to reproduce the crash.

peter-ahe-google commented 12 years ago

Repro:

cd dart/frog ../tools/build.py --mode release ./leg/tools/find_file_to_parse.sh | xcodebuild/Release_ia32/dart --new_gen_heap_size=500 leg/tools/mini_parser.dart -

peter-ahe-google commented 12 years ago

Repro at revision 2259.

As I submit more parser fixes, the error goes away. I think because I print less error messages.

ghost commented 12 years ago

Optimized code incorrect for strict equality comparison in case left is a literal and right is a deoptimization point.


Added Fixed label.