octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #59228] embedded.cc example crashes with segfa


From: Carlo de Falco
Subject: [Octave-bug-tracker] [bug #59228] embedded.cc example crashes with segfault
Date: Mon, 19 Oct 2020 02:09:32 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:81.0) Gecko/20100101 Firefox/81.0

Follow-up Comment #31, bug #59228 (project octave):

wait! even an empty "main ()" seems to crash when compiled with
mkoctfile --link-stand-alone


int main ()
{ 
  return (0);
}


build with


mkoctfile  --link-stand-alone  ../../test/intrp_test.cpp -o intrp_test


here is the backtrace in lldb


(lldb) run
Process 42084 launched:
'/Users/carlo/Documents/_Programmi/Miei/C/octave_file_io/BUILD/test/intrp_test'
(x86_64)
intrp_test(42084,0x1000a45c0) malloc: *** error for object 0x109b00000:
pointer being freed was not allocated
intrp_test(42084,0x1000a45c0) malloc: *** set a breakpoint in
malloc_error_break to debug
Process 42084 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00007fff5c7da2c2 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
->  0x7fff5c7da2c2 <+10>: jae    0x7fff5c7da2cc            ; <+20>
    0x7fff5c7da2c4 <+12>: movq   %rax, %rdi
    0x7fff5c7da2c7 <+15>: jmp    0x7fff5c7d4453            ; cerror_nocancel
    0x7fff5c7da2cc <+20>: retq   
Target 0: (intrp_test) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff5c7da2c2 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff5c895bf1 libsystem_pthread.dylib`pthread_kill + 284
    frame #2: 0x00007fff5c7446a6 libsystem_c.dylib`abort + 127
    frame #3: 0x00007fff5c853077 libsystem_malloc.dylib`malloc_vreport + 545
    frame #4: 0x00007fff5c852e38 libsystem_malloc.dylib`malloc_report + 151
    frame #5: 0x00000001000d1f6a
liboctinterp.8.dylib`dim_vector::freerep(this=0x000000010420d868) at
dim-vector.h:162:5
    frame #6: 0x000000010360acb7
liboctave.8.dylib`dim_vector::~dim_vector(this=0x000000010420d868) at
dim-vector.h:325:7
    frame #7: 0x00000001035f8035
liboctave.8.dylib`dim_vector::~dim_vector(this=0x000000010420d868) at
dim-vector.h:319:3
    frame #8: 0x0000000103a8a85c
liboctave.8.dylib`idx_vector::idx_vector_rep::~idx_vector_rep(this=0x000000010420d830)
at idx-vector.cc:451:1
    frame #9: 0x0000000103a88a05
liboctave.8.dylib`idx_vector::idx_vector_rep::~idx_vector_rep(this=0x000000010420d830)
at idx-vector.cc:446:1
    frame #10: 0x00007fff5c7453cf libsystem_c.dylib`__cxa_finalize_ranges +
319
    frame #11: 0x00007fff5c7456b3 libsystem_c.dylib`exit + 55
    frame #12: 0x00007fff5c69f3dc libdyld.dylib`start + 8
(lldb) 


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59228>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]