Re: [exim] Re: Problems with ${if ..} conditions

Góra strony
Delete this message
Reply to this message
Autor: Tony Finch
Data:  
Dla: Nikolaus Rath
CC: exim-users
Temat: Re: [exim] Re: Problems with ${if ..} conditions
On Sun, 6 Mar 2005, Nikolaus Rath wrote:
>
> I played around with gdb and got the following result:
>
> ---broken binary----
> Breakpoint 2, eval_condition (s=0xbfbffc85 "{a}{b} {true} {false}}", yield=0xbfbfec88) at expand.c:1772
> 1772        sub[i] = expand_string_internal(s+1, TRUE, &s, yield == NULL);
> (gdb) p s
> $12 = (uschar *) 0xbfbffc85 "{a}{b} {true} {false}}"
> (gdb) s
> expand_string_internal (
>     string=0x7374706d <Error reading address 0x7374706d: Bad address>, ket_ends=1,
>     left=0x6f72705f, skipping=0) at expand.c:2602
> [...]
> 2659        continue;


It's already gone wrong. The value passed to expand_string_internal which
should be s+1 has become 0x7374706d i.e. "mpts", and &s has become
0x6f72705f i.e. "_pro". Looks like the stack has been messed up. You
should try to work out when this happens.

What's different about the way the working and broken binaries have been
compiled?

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}