-   Slackware (
-   -   @#&@$ Segmentation fault !!! (

psionl0 07-27-2013 03:29 AM

@#&@$ Segmentation fault !!!
I have a PC with 64-bit Slackware 14.0 and multilib installed. I also have a netbook with 32-bit Slackware 14.0 installed.

I have blassic and dosbox installed on both (as 32 bit executables on the PC as well).

I find that when running blassic on the netbook, as soon as I try to dimension a string array, the program aborts with a "Segmentation fault" (and the Terminal program loses its cursor). No problem on the PC though.

Recently I decided to install Windows 3.1 on dosbox. I had no problems doing so on the netbook but I couldn't get very far on the PC before I got the dreaded "Segmentation fault".

This is a particularly unhelpful message as it is as if the system is trying to pretend that the program never ran. I am guessing that a library file might be the culprit but with no information whatsoever given when the fault appears, I am completely at a loss as to how I could track it down.

Is there any way to track down Segmentation faults? Could a static linking (if this is possible) help?

guanx 07-27-2013 05:04 AM


Originally Posted by psionl0 (Post 4997727)
This is a particularly unhelpful message as

This is a particularly helpful message because it often reveals a memory handling problem early. Compile the segfaulted program with debug information and run it under gdb or valgrind will narrow the problem down.

psionl0 07-27-2013 01:48 PM


Originally Posted by guanx (Post 4997761)
Compile the segfaulted program with debug information . . .

I'm not sure how I would modify a SlackBuild script to include the debug information.

mariostg 07-27-2013 04:55 PM

There are several places in the configure file where CXXFLAGS "seem" to be assigned "-g" (Line 2233 is one place, also 2291 to 2299) switch which would indicate build with debug option. I say "seem" because there are if/else stuff. Did you try to run under gdb as proposed by @guanx?

All times are GMT -5. The time now is 09:25 PM.