Subject: FvwmTheme core dumps when config file is read second time

From: [email-masked]
Date: Mon, 16 Aug 1999 14:10:21 +0100

Configuration Information [Automatically generated, do not change]:
uname output: SunOS tazmo 5.6 Generic sun4u sparc SUNW,Ultra-4
Compiler: gcc
Compilation CFLAGS: -g -O2
prefix: /home/tim
sysconfdir: /home/tim/etc
libexecdir: /home/tim/libexec

FVWM Version: 2.3.7
FVWM_CONFIGDIR: unset
FVWM_MODULEDIR: /home/tim/libexec/fvwm/2.3.7
FVWM_USERHOME: unset

Description:
	My config for FvwmTheme is:
*FvwmThemeColorSet 7 white blue ygradient 100 3 blue 49 navy 1 blue 50 navy
*FvwmThemeColorSet 6 white blue rgradient 100 blue navy
*FvwmThemeColorSet 5 white blue cgradient 100 blue navy
*FvwmThemeColorSet 4 white blue sgradient 100 blue navy
*FvwmThemeColorSet 3 white blue dgradient 100 blue navy
*FvwmThemeColorSet 2 white blue vgradient 100 blue navy
*FvwmThemeColorSet 1 black cyan tiledpixmap PT_003.xpm
*FvwmThemeColorSet 0 black pink tiledpixmap PT_004.xpm
	If fvwm reads the config file a second time FvwmTheme core dumps with the
	following trace:
(gdb) where
#0  0xef445bf8 in _malloc_unlocked () from /usr/lib/libc.so.1
#1  0xef4459e0 in malloc () from /usr/lib/libc.so.1
#2  0x16ef4 in safemalloc (length=4356) at safemalloc.c:42
#3  0x16108 in CreateGradientPixmap (dpy=0x2ad78, d=8388609, gc=0x32b60, type=89, 
    action=0x4 <Address 0x4 out of bounds>, width_return=0xefffef98, 
    height_return=0x1104) at Graphics.c:456
#4  0x133a4 in parse_colorset (line=0x29f86 "100 3 blue 49 navy 1 blue 50 navy\n")
    at FvwmTheme.c:379
#5  0x12cc4 in parse_config_line (
    line=0x29f5c "*FvwmThemeColorSet 7 white blue ygradient 100 3 blue 49 navy 1 blue 50 navy\n") at FvwmTheme.c:167
#6  0x12c20 in main_loop () at FvwmTheme.c:131
#7  0x12bc8 in main (argc=6, argv=0xeffff28c) at FvwmTheme.c:112

Repeat-By:
	Read .fvwm2rc

Fix:
	??? don't know why a safemalloc(4356) should coredump.
	The <Address 0x4 out of bounds> at #3 looks suspicious.

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: [email-masked] (Paul D. Smith)
Date: 16 Aug 1999 12:13:25 -0400

%% [email-masked] writes:

  tp> 	??? don't know why a safemalloc(4356) should coredump.
  tp> 	The <Address 0x4 out of bounds> at #3 looks suspicious.

Perhaps to state the obvious, but whenever malloc (etc.) dump core that
almost invariably means you have a heap-stomp somewhere: something is
writing past the end of allocated memory, or into previously freed
memory, or even into totally bogus memory (via an uninitialized pointer
or somesuch).

A tool such as Purify or dmalloc or similar should be helpful here.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 16 Aug 1999 20:34:45 +0200

> 	The <Address 0x4 out of bounds> at #3 looks suspicious.

I got the coredump at first too (but not in safemalloc). Then I
recompiled and now everything works fine.

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]