bugGNU Octave - Bugs: bug #59189, Octave crashes on start on Windows

 
 

bug #59189: Octave crashes on start on Windows

Submitter:  Markus Mützel <mmuetzel>
Submitted:  Sun 27 Sep 2020 12:35:44 PM UTC
   
 
Category:  Interpreter Severity:  5 - Blocker
Priority:  7 - High Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 6.0.90 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 27 Sep 2020 05:54:31 PM UTC, comment #3: 

I tried your patch and it fixes the issue for me.

Thanks for the fix and the fast reaction time.

Closing as fixed.

Markus Mützel <mmuetzel>
Group administrator
Sun 27 Sep 2020 05:42:48 PM UTC, comment #2: 

I went ahead and pushed it on stable and merged iwth default:

http://hg.savannah.gnu.org/hgweb/octave/rev/7e0712b3388f

John W. Eaton <jwe>
Group administrator
Sun 27 Sep 2020 03:52:07 PM UTC, comment #1: 

Oops, I neglected to think about what would happen when finding the parent stack frame when there are no stack frames (i.e., pushing the initial frame for the top scope).

Can you try the attached patch?  If it works, I'll push a proper changeset.

(file #49870)

John W. Eaton <jwe>
Group administrator
Sun 27 Sep 2020 12:35:44 PM UTC, original submission:  

The current stable branch of Octave (hg id c5953e65c6aa) was built with MXE Octave (hg id e2582a427c2a) for 64bit Windows.
GUI and CLI both crash on start-up.

`gdb` backtrace:

$ gdb octave-cli
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from octave-cli...
(gdb) r
Starting program: D:\SVN\Octave\test\OC0A21~1\OCTAVE~1\mingw64\bin\octave-cli.exe
[New Thread 7176.0x23a4]
[New Thread 7176.0x1f30]
[New Thread 7176.0xf1c]

Thread 1 received signal SIGSEGV, Segmentation fault.
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count (__r=...,
    this=0x51e1a4f8)
    at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/usr/lib/gcc/x86_64-w64-mingw32/9.3.0/include/c++/bits/shared_ptr_base.h:737
737     /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/usr/lib/gcc/x86_64-w64-mingw32/9.3.0/include/c++/bits/shared_ptr_base.h: No such file or directory.
(gdb) bt
#0  std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count (__r=...,
    this=0x51e1a4f8)
    at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/usr/lib/gcc/x86_64-w64-mingw32/9.3.0/include/c++/bits/shared_ptr_base.h:737
#1  std::__shared_ptr<octave::stack_frame, (__gnu_cxx::_Lock_policy)2>::__shared_ptr (this=0x51e1a4f0)
    at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/usr/lib/gcc/x86_64-w64-mingw32/9.3.0/include/c++/bits/shared_ptr_base.h:1167
#2  std::shared_ptr<octave::stack_frame>::shared_ptr (this=0x51e1a4f0)
    at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/usr/lib/gcc/x86_64-w64-mingw32/9.3.0/include/c++/bits/shared_ptr.h:129
#3  octave::stack_frame::stack_frame (access_link=..., static_link=...,
    parent_link=..., index=0, tw=..., this=0x51e1a4d0)
    at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/tmp-stable-octave/octave-6.0.91/libinterp/corefcn/stack-frame.h:148
#4  octave::base_value_stack_frame::base_value_stack_frame (
    this=this@entry=0x51e1a4d0, tw=..., num_symbols=1, index=index@entry=0,
    parent_link=..., static_link=..., access_link=...)
    at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/tmp-stable-octave/octave-6.0.91/libinterp/corefcn/stack-frame.cc:300
#5  0x00000000141828ff in octave::scope_stack_frame::scope_stack_frame (
    static_link=..., parent_link=..., index=0, scope=..., tw=...,
    this=0x51e1a4d0)
    at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/usr/lib/gcc/x86_64-w64-mingw32/9.3.0/include/c++/bits/stl_map.h:468
#6  octave::stack_frame::create (tw=..., scope=..., index=0, parent_link=..., static_link=...) at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/tmp-stable-octave/octave-6.0.91/libinterp/corefcn/stack-frame.cc:1074
#7  0x0000000013da33bc in octave::call_stack::push (this=this@entry=0x51bd0f00, scope=...) at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/usr/lib/gcc/x86_64-w64-mingw32/9.3.0/include/c++/bits/stl_deque.h:1400
#8  0x0000000013da4081 in octave::call_stack::call_stack (this=0x51bd0f00, evaluator=...) at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/usr/lib/gcc/x86_64-w64-mingw32/9.3.0/include/c++/bits/shared_ptr_base.h:199
#9  0x0000000014020576 in octave::tree_evaluator::tree_evaluator (interp=..., this=0x51bd0de8) at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/usr/lib/gcc/x86_64-w64-mingw32/9.3.0/include/c++/bits/stl_tree.h:211
#10 octave::interpreter::interpreter (this=0x51bd0080, app_context=<optimized out>) at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/tmp-stable-octave/octave-6.0.91/libinterp/corefcn/interpreter.cc:473
#11 0x00000000137a14a0 in octave::application::create_interpreter (this=0x68fbf0) at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/tmp-stable-octave/octave-6.0.91/libinterp/octave.cc:302
#12 0x00000000137a151e in octave::cli_application::execute (this=this@entry=0x68fbf0) at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/tmp-stable-octave/octave-6.0.91/libinterp/octave.cc:377
#13 0x0000000000402f0e in main (argc=1, argv=0x4f945890) at /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/tmp-stable-octave/octave-6.0.91/src/main-cli.cc:95
(gdb)


Might be related to:

changeset:   28794:c5953e65c6aa
branch:      stable
parent:      28787:396d3e1df78b
user:        John W. Eaton <jwe@octave.org>
date:        Fri Sep 25 09:43:53 2020 -0400
files:       libinterp/corefcn/call-stack.cc libinterp/corefcn/call-stack.h libinterp/corefcn/stack-frame.cc libinterp/corefcn/stack-frame.h
description:
track direct caller in stack frames

* stack-frame.h, stack-frame.cc (stack_frame::m_parent_link): New data
member to track direct parent, not just user-defined function, script,
or scope frames as m_static_link does.
(stack_frame::parent_link): New function.
(stack_frame::stack_frame): Accept parent_link argument.  Change all uses.
(stack_frame::create): Accept parent_link argument.  Change all uses.

* call-stack.cc (call_stack::pop): Set m_curr_frame to parent_link,
not static_link.


This is a blocker for the 6.1 release.

Markus Mützel <mmuetzel>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #49870:  call-stack-diffs.txt added by jwe (8KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by mmuetzel (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-09-27 jwe Open/ClosedOpen Closed
    2020-09-27 jwe Open/ClosedClosed Open
    2020-09-27 mmuetzel StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2020-09-27 jwe StatusNone Ready For Test
    2020-09-27 jwe Attached File- Added call-stack-diffs.txt, #49870
    2020-09-27 mmuetzel Priority5 - Normal 7 - High

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code