Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault in ImportsModel::rowCount(QModelIndex const&) const #30

Closed
notxenonbox opened this issue Apr 15, 2021 · 9 comments
Closed
Assignees

Comments

@notxenonbox
Copy link

Environment Details

I use arch linux with swaywm (wayland), I tried running iaito with QT_QPA_PLATFORM=xcb and without it.

neo@fukushima ~
λ iaito -v
date
r2 -v
uname -ms

QCommandLineParser: already having an option named "w"
iaito 0.1.0
2021-04-15T14:21:08 CEST
radare2 5.2.0 25999 @ linux-x86-64 git.5.2.0-28-ged5d73d3a7
commit: ed5d73d3a75a5c86392116fd8ed6c38cf557d539 build: 2021-04-15__09:17:02
Linux x86_64

Description

When I run iaito I get a segfault:

neo@fukushima ~/clone/iaito master*
λ build/iaito

QCommandLineParser: already having an option named "w"
Plugins are loaded from "/home/neo/.local/share/radareorg/iaito/plugins"
Loaded 0 plugin(s).
Plugins are loaded from "/usr/local/share/radareorg/iaito/plugins"
Plugins are loaded from "/usr/share/radareorg/iaito/plugins"
[1]    31734 segmentation fault (core dumped)  build/iaito

neo@fukushima ~/clone/iaito master*
λ QT_QPA_PLATFORM=xcb build/iaito

QCommandLineParser: already having an option named "w"
Plugins are loaded from "/home/neo/.local/share/radareorg/iaito/plugins"
Loaded 0 plugin(s).
Plugins are loaded from "/usr/local/share/radareorg/iaito/plugins"
Plugins are loaded from "/usr/share/radareorg/iaito/plugins"
[1]    31806 segmentation fault (core dumped)  QT_QPA_PLATFORM=xcb build/iaito

When I open it in gdb and run it I get the following output:

Reading symbols from build/iaito...
(No debugging symbols found in build/iaito)
(gdb) run
Starting program: /home/neo/clone/iaito/build/iaito
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff1128640 (LWP 31388)]
[New Thread 0x7fffe4bce640 (LWP 31389)]
[New Thread 0x7fffdffff640 (LWP 31390)]
[New Thread 0x7fffd7fff640 (LWP 31391)]
[New Thread 0x7fffdf7fe640 (LWP 31392)]
[New Thread 0x7fffdeffd640 (LWP 31393)]
[New Thread 0x7fffde7fc640 (LWP 31394)]
[New Thread 0x7fffddffb640 (LWP 31395)]
[New Thread 0x7fffdd7fa640 (LWP 31396)]
[New Thread 0x7fffdcff9640 (LWP 31397)]
[New Thread 0x7fffd77fe640 (LWP 31398)]
[New Thread 0x7fffd6ffd640 (LWP 31399)]
[New Thread 0x7fffd67fc640 (LWP 31400)]
[New Thread 0x7fffd5ffb640 (LWP 31401)]
[New Thread 0x7fffd57fa640 (LWP 31402)]
[New Thread 0x7fffd4ff9640 (LWP 31403)]
[New Thread 0x7fff9ffff640 (LWP 31404)]
[New Thread 0x7fff97fff640 (LWP 31405)]
[New Thread 0x7fff9f7fe640 (LWP 31406)]
[New Thread 0x7fff9effd640 (LWP 31407)]
[New Thread 0x7fff9e7fc640 (LWP 31408)]
[New Thread 0x7fff9dffb640 (LWP 31409)]
[New Thread 0x7fff9d7fa640 (LWP 31410)]
[New Thread 0x7fff9cff9640 (LWP 31411)]
QCommandLineParser: already having an option named "w"
[New Thread 0x7fff977fe640 (LWP 31412)]
Plugins are loaded from "/home/neo/.local/share/radareorg/iaito/plugins"
Loaded 0 plugin(s).
Plugins are loaded from "/usr/local/share/radareorg/iaito/plugins"
Plugins are loaded from "/usr/share/radareorg/iaito/plugins"

Thread 1 "iaito" received signal SIGSEGV, Segmentation fault.
0x00005555556f5377 in ImportsModel::rowCount(QModelIndex const&) const ()
(gdb)

I'm not sure what else info to provide. Feel free to ask anything.

@CountMurphy
Copy link

Also running Arch Linux (but with X11). Same error.

@trufae
Copy link
Collaborator

trufae commented Apr 15, 2021

I don't have any handy archlinux but i have tested the current code from git on Ubuntu20 and builds and runs fine, i have also updated the README with the proper qt5 packages needed to build.

Could you share the pacman packages needed to build iaito by updating the README?

Can you provide a full backtrace from gdb or build iaito with asan to get a meaningful crashlog for me to make a blind fix for it?

thanks!

@trufae trufae self-assigned this Apr 15, 2021
@drago-sp
Copy link

Possibly related to changes in Qt. Ubuntu 20.04 is on Qt 5.12, Ubuntu 20.10 is on Qt 5.14, Arch current is Qt 5.15.

@notxenonbox
Copy link
Author

Can you provide a full backtrace from gdb or build iaito with asan to get a meaningful crashlog for me to make a blind fix for it?

here is the backtrace:

(gdb) run
Starting program: /home/neo/clone/iaito/build/iaito

[...snip]

Plugins are loaded from "/usr/share/radareorg/iaito/plugins"

Thread 1 "iaito" received signal SIGSEGV, Segmentation fault.
0x00005555556f5377 in ImportsModel::rowCount(QModelIndex const&) const ()
(gdb) backtrace
#0  0x00005555556f5377 in ImportsModel::rowCount(QModelIndex const&) const ()
#1  0x00007ffff5ce89db in ?? () from /usr/lib/libQt5Core.so.5
#2  0x00007ffff5cf2982 in QSortFilterProxyModel::setSourceModel(QAbstractItemModel*) () from /usr/lib/libQt5Core.so.5
#3  0x00005555557b617f in AddressableFilterProxyModel::setSourceModel(AddressableItemModelI*) ()
#4  0x00005555557b61d6 in AddressableFilterProxyModel::AddressableFilterProxyModel(AddressableItemModelI*, QObject*) ()
#5  0x00005555556f59fa in ImportsProxyModel::ImportsProxyModel(ImportsModel*, QObject*) ()
#6  0x00005555556f5c0e in ImportsWidget::ImportsWidget(MainWindow*) ()
#7  0x00005555556b6d70 in MainWindow::initDocks() ()
#8  0x00005555556be1b1 in MainWindow::initUI() ()
#9  0x00005555556bf502 in MainWindow::MainWindow(QWidget*) ()
#10 0x000055555574d87f in IaitoApplication::IaitoApplication(int&, char**) ()
#11 0x000055555565be10 in main ()

@trufae
Copy link
Collaborator

trufae commented Apr 16, 2021

There are a bunch of warnings of wrong c++ usage in some classes, and this is making qt6 builds crash, maybe this is the same issue you are having? I fixed many of those warnings already, can you see them in your archlinux build? Mind to try to fix them (or comment the affected code) to confirm the issue? Thanks!

@notxenonbox
Copy link
Author

There are a bunch of warnings of wrong c++ usage in some classes, and this is making qt6 builds crash, maybe this is the same issue you are having? I fixed many of those warnings already, can you see them in your archlinux build? Mind to try to fix them (or comment the affected code) to confirm the issue? Thanks!

It's just implicit fallthrough and defined but not used warnings

@notxenonbox
Copy link
Author

Can you provide a full backtrace from gdb or build iaito with asan to get a meaningful crashlog for me to make a blind fix for it?

It's the same with and without asan. And yes I deleted the build directory.

@radare radare closed this as completed in 02a130e Apr 17, 2021
@trufae
Copy link
Collaborator

trufae commented Apr 17, 2021

Please confirm the fix :)

@drago-sp
Copy link

Can confirm this is fixed, thanks!

iaito 5.2.1
radare2 5.2.0 0 @ linux-x86-64 git.5.2.0
Arch Linux x86_64
qt5-base 5.15.2+kde+r172-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants