st: disable tagged pointer checking

Doesn't fix issue completely.

Abort message: 'Scudo ERROR: misaligned pointer when deallocating address 0x006245ce8c98

https://github.com/termux/x11-packages/issues/407
This commit is contained in:
Leonid Pliushch 2021-08-19 22:45:20 +03:00 committed by Yaksh Bariya
parent 5ae2ebcea7
commit 748c37b343
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,30 @@
diff -uNr st-0.8.4/x.c st-0.8.4.mod/x.c
--- st-0.8.4/x.c 2020-06-19 12:29:45.000000000 +0300
+++ st-0.8.4.mod/x.c 2021-08-19 22:20:11.807595168 +0300
@@ -15,6 +15,9 @@
#include <X11/Xft/Xft.h>
#include <X11/XKBlib.h>
+#include <stdbool.h>
+#include <dlfcn.h>
+
char *argv0;
#include "arg.h"
#include "st.h"
@@ -1980,6 +1983,16 @@
int
main(int argc, char *argv[])
{
+ void *lib_handle = dlopen("libc.so", RTLD_LAZY);
+ if (lib_handle) {
+ bool (*android_mallopt)(int opcode, void* arg, size_t arg_size) = dlsym(lib_handle, "android_mallopt");
+ if (android_mallopt) {
+ int android_malloc_tag_level = 0;
+ android_mallopt(8, &android_malloc_tag_level, sizeof(android_malloc_tag_level));
+ }
+ dlclose(lib_handle);
+ }
+
xw.l = xw.t = 0;
xw.isfixed = False;
xsetcursor(cursorshape);

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A simple virtual terminal emulator for X"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Tristan Ross <spaceboyross@yandex.com>"
TERMUX_PKG_VERSION=0.8.4
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL="http://dl.suckless.org/st/st-$TERMUX_PKG_VERSION.tar.gz"
TERMUX_PKG_SHA256=d42d3ceceb4d6a65e32e90a5336e3d446db612c3fbd9ebc1780bc6c9a03346a6
# FIXME: config.h specified a Liberation Mono font which is not available in Termux.