LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   runtime malloc error on C wm spectrwm (https://www.linuxquestions.org/questions/slackware-14/runtime-malloc-error-on-c-wm-spectrwm-4175736050/)

phalange 04-15-2024 10:13 AM

runtime malloc error on C wm spectrwm
 
This WM called spectrwm is in C. Version 3.5+ builds ok on Slack 15 but startx results in a runtime malloc() error.

Anyone know where I can get more detail about what's breaking here? I can open a bug report, but I'd like to figure out if this is something strange with slackware.

teckk 04-15-2024 05:19 PM

From what little that you posted.

https://github.com/conformal/spectrwm
https://www.tutorialspoint.com/c_sta...ion_malloc.htm
https://www.geeksforgeeks.org/dynami...e-and-realloc/

Post the complete error/errors that you are getting. You don't get any compile errors?

henca 04-16-2024 01:07 AM

When malloc fails it usually means that you somehow has run out of RAM. That could be because of a memory leak which tools like valgrind are good at detecting.

However, if you are not willing to do the bug hunting yourself to later provide a bugfix patch a simpler solution might be to look for a more stable window manager. The web page for spectrwm mentions two other window managers and to me it also looks very much like the i3 window manager which I haven't used myself but know some people that prefer it. https://slackbuilds.org/repository/15.0/desktop/i3/

regards Henrik

pan64 04-16-2024 01:23 AM

I don't really think it is a bug in slackware (which is not impossible but highly unlikely). I'm curious what do you want to write in that bug report?
Anyway, would be nice to see more. At least the full error message you got (and build log probably). (see post #2)

ponce 04-16-2024 01:37 AM

Quote:

Originally Posted by phalange (Post 6496121)
This WM called spectrwm is in C. Version 3.5+ builds ok on Slack 15 but startx results in a runtime malloc() error.

Anyone know where I can get more detail about what's breaking here? I can open a bug report, but I'd like to figure out if this is something strange with slackware.

FWIW I found this (it's in their issue tracker)

https://github.com/conformal/spectrwm/issues/567

phalange 04-17-2024 08:07 AM

Thanks for the replies.

I posted to SBo group, but it seems to run on some one else's system. Myself, I'm running a vanilla full install of Slack15.

Quote:

Originally Posted by pan64 (Post 6496246)
I'm curious what do you want to write in that bug report?

That's part of the problem. The error message offers little and the issue is not universal.

Quote:

Originally Posted by ponce (Post 6496253)
FWIW I found this (it's in their issue tracker)

https://github.com/conformal/spectrwm/issues/567

Thank you ponce I added mine to that thread too.

The xorg log is

Code:

X.Org X Server 1.20.14
X Protocol Version 11, Revision 0
Build Operating System: Slackware 15.0 Slackware Linux Project
Current Operating System: Linux slack-t470s.localdomain 5.15.145 #1 SMP PREEMPT Sun Dec 24 00:07:06 CST 2023 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-huge-5.15.145 root=/dev/mapper/slackvg-slackware ro
Build Date: 03 April 2024  05:19:08PM

Current version of pixman: 0.40.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Apr 15 21:28:05 2024
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
spectrwm: Welcome to spectrwm V3.5.1 Build: 3.5.1
malloc(): invalid size (unsorted)
xinit: connection to X server lost

waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.


henca 04-17-2024 02:03 PM

That error does not sound like you are running out of memory. It rather sounds as if the application somehow has broken its heap memory. Running valgrind on such an application compiled with debug symbols will probably quickly point to the bug.

regards Henrik

pan64 04-18-2024 01:01 AM

https://stackoverflow.com/questions/...-size-unsorted
here is a similar issue, just to see how can it be analyzed.


All times are GMT -5. The time now is 12:21 PM.