root-project/cling

some bugs

cpp-deep-learning opened this issue · 1 comments

  • Checked for duplicates

Describe the bug

libunwind: Unsupported .eh_frame_hdr version
#0 0x0000007a219b6b5c backtrace (/data/data/com.termux/files/usr/lib/libandroid-execinfo.so+0x3b5c)
#1 0x0000005baabe0810 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/data/com.termux/files/usr/share/cling/bin/cling+0x225d810)
#2 0x0000005baabde9a0 llvm::sys::RunSignalHandlers() (/data/data/com.termux/files/usr/share/cling/bin/cling+0x225b9a0)
#3 0x0000005baabe11f8 SignalHandler(int) Signals.cpp:0:0
#4 0x0000007a232f6624 ([vdso]+0x624)
#5 0x0000007a21edcd18 std::__ndk1::istreambuf_iterator<char, std::__ndk1::char_traits<char>> std::__ndk1::num_get<char, std::__ndk1::istreambuf_iterator<char, std::__ndk1::char_traits<char>>>::__do_get_floating_point<long double>(std::__ndk1::istreambuf_iterator<char, std::__ndk1::char_traits<char>>, std::__ndk1::istreambuf_iterator<char, std::__ndk1::char_traits<char>>, std::__ndk1::ios_base&, unsigned int&, long double&) const (/data/data/com.termux/files/usr/lib/libc++_shared.so+0xa8d18)
#6 0x0000007a21ebe6b0 (/data/data/com.termux/files/usr/lib/libc++_shared.so+0x8a6b0)
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0.      Program arguments: cling
[1]    17746 segmentation fault  cling

cling version:1.0~dev
OS:Android Termux
reason:I use a class with for-each std::cin input the data then the cling breaked
my run code:

#include<cstdio>
#include<iostream>
#include<new>

extern "C" {
    #include<stdlib.h>
}

typedef long double M_value;
typedef unsigned long long Number;

class Matrix {
private:
    M_value* value;
    Number x,y;
public: 
    Matrix();
    Matrix(const Number& row,const Number& column);
    ~Matrix();
    void info();
    void set();
    void display();


};

Matrix::Matrix() {
    std::cout << "please input the row"<< std::endl;
    std::cin >> x;
    std::cout << "please input the column"<< std::endl;
    std::cin >> y;
    value=new (this) M_value[x*y];
}

Matrix::Matrix(const Number& row,const Number& column) {
    x=row,y=column;
    value=new (this) M_value[x*y];
}

Matrix::~Matrix() {
    delete []value;
}

void Matrix::info() {
    std::cout << "the Matrix row is:" << this->x << std::endl;
    std::cout << "the Matrix column is:" << this->y << std::endl;
}

void Matrix::set() {
    for(Number i=0;i<(x*y);i++)
        std::cin >> value[i];
}

void Matrix::display() {
    for(Number i=0;i<(x*y);i++)
        std::cout << value[i] << std::endl;
}

Expected behavior

To Reproduce

Setup

Additional context

We have no experience with Android Termux. I don't plan to debug this, and you didn't have anyone else pick this up for almost half a year - closing this.