Issue 81821 - dmake doesn't check for not empty right side of a modifier
Summary: dmake doesn't check for not empty right side of a modifier
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: dmake (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: quetschke
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-21 15:11 UTC by hjs
Modified: 2013-08-07 15:34 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Band aid patch for dmake (1.02 KB, patch)
2007-09-22 19:13 UTC, quetschke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description hjs 2007-09-21 15:11:07 UTC
snip -------------

%.a :
    echo $(@:)
    $(foreach,i,$@ echo $(i:))

all: ttt.a

snap -----------

similar constructs even led to segmentationfaults (4.9) or glibc "heap
corruption" messages (4.11) on linux.
Comment 1 quetschke 2007-09-22 04:17:30 UTC
@ause: I need some more details. I tried your example with a dmake 4.11
on cygwin and linux with the following makefile:

- - -
SHELL*:=/bin/sh
SHELLFLAGS*:=-ce

%.a :
	echo $(@:)
	$(foreach,i,$@ echo $(i:))

all: ttt.a

- - -

and also within the OOo environment of a SRC680_m229 (without the first two
lines of the makefile) with just `dmake`. No problems here, the : just gets
ignored.

I am sure if I make dmake issue an error if it finds a : without following
modifier that would solve your problem, but I am curious what fails.
Comment 2 hjs 2007-09-22 09:51:06 UTC
@vq: the best i can offer atm is the cws ause085 with tg_dep.mk still containing
the syntax error. now build the module zlib.
see also http://termite.go-oo.org/buildbot/Win-XP/builds/44/step-shell_5/0
(search for "dumped")
i will try to reproduce the crash with a testcase on monday.
Comment 3 hjs 2007-09-22 13:25:58 UTC
ok, i fooled myself as the crash i was looking for does happen with -Pn n>1
only. so i thought fixing the syntax error fixed the crash too...

btw., the crash still happens in zlib in the makefile created by the patch.
moving  the include of target.mk a the bottom seems to workaround it.
Comment 4 quetschke 2007-09-22 19:13:45 UTC
Created attachment 48421 [details]
Band aid patch for dmake
Comment 5 quetschke 2007-09-22 19:19:09 UTC
The problem seems to be the same as issue 80012, at least the previous patch
works around the zlib problem and the testcase from 80012.

ause: I don't know if I want to look into the "correct" solution for this
problem in the dmake411 time frame, but the previous band-aid IMHO could still
go in. Having this is better than crashing.

P.S.: Having a short testcase for the zlib case would be nice to have ;)
Comment 6 quetschke 2007-11-19 18:20:36 UTC
This issue was fixed with issue 80012.
Comment 7 quetschke 2007-11-19 18:21:05 UTC
Close