qt5 and W^X violation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

qt5 and W^X violation

David Coppa

Hi!

Every time I launch minitube, I see this:

---8<---

$ minitube &
[1] 16239
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-dcoppa'
JIT is disabled for QML. Property bindings and animations will be very slow. Visit https://wiki.qt.io/V4 to learn about possible solutions for your platform.
JIT is disabled for QML. Property bindings and animations will be very slow. Visit https://wiki.qt.io/V4 to learn about possible solutions for your platform.

$ dmesg | tail -n 1
minitube(16239): mmap W^X violation

---8<---

This is new to me. Searching on Google, it seems this feature has
been introduced with Qt 5.7.

Does it mean that now every qt5-based port should be marked with
WXNEEDED?

What would be the downside of disabling this QML JIT? Is it really
so slow without it?

Ciao,
David

Reply | Threaded
Open this post in threaded view
|

Re: qt5 and W^X violation

Vadim Zhukov-2
13 авг. 2017 г. 4:34 ПП пользователь "David Coppa" <[hidden email]>
написал:


Hi!

Every time I launch minitube, I see this:

---8<---

$ minitube &
[1] 16239
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-dcoppa'
JIT is disabled for QML. Property bindings and animations will be very
slow. Visit https://wiki.qt.io/V4 to learn about possible solutions for
your platform.
JIT is disabled for QML. Property bindings and animations will be very
slow. Visit https://wiki.qt.io/V4 to learn about possible solutions for
your platform.

$ dmesg | tail -n 1
minitube(16239): mmap W^X violation

---8<---

This is new to me. Searching on Google, it seems this feature has
been introduced with Qt 5.7.

Does it mean that now every qt5-based port should be marked with
WXNEEDED?

What would be the downside of disabling this QML JIT? Is it really
so slow without it?


It depends. What happens is that QML engine checks if W^X is enabled at
runtime, so things work either way. If application performance satisfies
you, then you should not USE_WXNEEDED, and if not - you know what to do.
Since minitube and other QML applications are not console ones, I don't
think those warnings have to be removed.

In other words, it's up to maintainer of port using QML whether to enable
JIT or not.

Any brave soul willing to make QML JIT work without violating W^X be my
guest. :)