[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug] lost mktemp reference?



Hi,

Ive found the 'where' of this problem, but I have yet to
find the 'why'.

http://web.cecs.pdx.edu/~htyler/gitweb/?p=herbstlogic;a=blob;f=scripts/shift.out;h=0a29a9b0c25687c6fba3268cdd8fdb9adccdefba;hb=ccc117db7b74488150658bfe82d09a68f57efe38

This is the script Im trying to run. Ive linked to a
gitweb for reference only (with herbstlogic pretty-
print :D), Ill copy/paste the runnable
arguments below.

The problem lies on line 60. When I substitute an
attribute with a MUCH greater recursion level, it works
fine. After line 60 though, the reference to the mktemp
attribute 'delta' seems to get lost. When I attempt to
dereference it at line 64, hlwm crashes. I assume this
is a segfault because the reference is lost, but perhaps
it is a different issue.

You can try it yourself by removing line 60. Line 64
executes just fine.


Here are the arguments including line 60
(WARNING, may crash :D)
chain hls_0  mktemp string delta mktemp string antidir   chain  hls_2  set_attr antidir r   hls_2  set_attr delta +1   hls_2  chain  hls_18  and  hls_21  mktemp string COMP7   chain  hls_8  set_attr COMP7 r   hls_8  compare COMP7 = l   hls_21  chain  hls_20  chain  hls_11  set_attr antidir r   hls_11  set_attr delta -1   hls_20  true   hls_18  substitute SUB17 delta echo SUB17   hls_2  substitute SUB23 antidir echo SUB23   hls_2  echo r   hls_2  and  hls_50  ! shift r   hls_50  chain  hls_49  chain  hls_28  chain  hls_40  and  hls_43  mktemp string COMP31   chain  hls_32  set_attr COMP31 shift   hls_32  compare COMP31 = shift   hls_43  chain  hls_42  chain  hls_35  substitute SUB37 delta shift_to_monitor SUB37   hls_42  true   hls_40  substitute SUB39 delta cycle_monitor SUB39   hls_28  substitute SUB45 antidir shift_edge SUB45   hls_49  true  

And here they are with line 60 removed

chain hls_0  mktemp string delta mktemp string antidir   chain  hls_2  set_attr antidir r   hls_2  set_attr delta +1   hls_2  chain  hls_18  and  hls_21  mktemp string COMP7   chain  hls_8  set_attr COMP7 r   hls_8  compare COMP7 = l   hls_21  chain  hls_20  chain  hls_11  set_attr antidir r   hls_11  set_attr delta -1   hls_20  true   hls_18  substitute SUB17 delta echo SUB17   hls_2  substitute SUB23 antidir echo SUB23   hls_2  echo r   hls_2  and  hls_50  ! shift r   hls_50  chain  hls_49  chain  hls_28  chain  hls_40  and  hls_43  mktemp string COMP31   chain  hls_32  set_attr COMP31 shift   hls_32  compare COMP31 = shift   hls_43  chain  hls_42  chain  hls_35  hls_42  true   hls_40  substitute SUB39 delta cycle_monitor SUB39   hls_28  substitute SUB45 antidir shift_edge SUB45   hls_49  true  


Ill keep on searching for the problem in the mean time,
but any help would be appreciated

Thanks!
Tylo