Hi,
I've chased a strange core dump of Expect down to quite a simple regexp - now I am stuck and looking for advice/ideas/memories:
expect:/tmp$ set exp_library
/usr/lib/expect5.45
expect:/tmp$ set tcl_patchLevel
8.6.4
expect:/tmp$ exp_internal 0
expect:/tmp$ log_user 0
1
expect:/tmp$ spawn ls -l
10133
expect:/tmp$ expect -re {(?x)[\r\n]+?}
expect:/tmp$ expect -re {(?x)[\r\n]+?
}
alloc: invalid block: 0x25fdfe0: ef ef 0
Aborted (core dumped)
Notes:
* A trailing newline in the expanded syntax makes a difference, but it is not the sole contributor to the core dump. (I have a more complex regexp that also ends in [\r\n]+? and that works ...)
* The regexp alone, i.e. with [regexp], has no issue.
* The core dump happens independent of whether the spawn id is open, i.e. while preparing, not while matching against the buffer.
expect:/tmp$ regexp {(?x)[\r\n]+?} foo
0
expect:/tmp$ regexp {(?x)[\r\n]+?
} foo
0
expect:/tmp$ regexp {(?x)[\r\n]+?
} foo\nbar\n
1
It looks like Expect has issue generating the glob-gate for that regexp.
no core dump:
expect -re {(?x)^
(foo|bar)
[\r\n]+?
}
core dump:
expect -re {(?x)^
(foo)
[\r\n]+?
}
Does anyone have an idea/hint?
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)