bug report: crm114 'eval' throws error depending on *value* being 'eval'-ed (demo script included)

"Ger Hobbelt" <[email protected]>
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
Ladies & Gentlemen,

eval b0rks on empty value: run this demo script to see what I mean:


DEMO SCRIPT:
--------------------
window

isolate (:a:) /A/
isolate (:v1:) /V1-value/
isolate (:v2:) //
isolate (:b:) /:a:/

eval (:*:b:) /:*:v1:/

output /A1 = ':*:a:'\n/

eval (:*:b:) /:*:v2:/

output /A2 = ':*:a:'\n/


trap (:ex:) //

output /EXCEPTION: :*:ex:\n/
--------------------


EXPECTED (CORRECT) OUTPUT:
-------------------
A1 = 'V1-value'
A2 = ''
-------------------

GerH build does this correctly (of course ;-) ) since long time
(probably since spring 2008 as that was Spring Cleaning Time for the
crm114 code).


PRODUCED (ERRONEOUS) OUTPUT:
-------------------
A1 = 'V1-value'
EXCEPTION:
./crm114: *WARNING*
 The variable you're attempting to EVAL seemes to return to the same
value after a number of iterations, so it is probably an infinite
loop.  I think I should give up.  I got this far:
I'll try to keep working.
This happened at line 12 of file
../../../../../3actual/crm114/tests/eval_ref_test1.crm
(runtime system location: crm_expr_alter.c(150) in routine: crm_expr_eval)
-------------------
as reproduced in tests with latest vanilla WGET crm114 on 64-bit.


NOTES:
My sure bet @ 99.999% is that this also happens for all 32-bit
versions out there, as I had to hunt this bug down after somebody
(Eric) had requested enhanced mailreaver/mailtrainer code (which
supports non-cached classify & train for all those folks who don't
want the 'reaver cache' (= probably all database-based email filter
folks). And he was running nice 'n easy on a UNIX 32-bit box.


FIX:
You're used to seeing C source code patches to go with my bug reports.
Not this time. Had a look at all the eval/strmath/etc. goodness
tonight (it's past 2 AM) in vanilla again and got a 'total recall' of
my Spring Cleaning 2008 run. It wasn't nice. You might be able to
convince me to extract a fix-for-only-this from the GerH code in a few
days maybe, but not tonight. <rant> Better yet: pull the whole shebang
from GerH into mainline. It's spring cleaned. That doesn't mean I'm
error-free. It means I can expect less errors and 'weird stuff' to
distract and delay me while I'm working on important stuff. Which is
the way to go if you want to do software in a commercial setting.  And
right now, I get the feeling I'm duplicating my Spring Cleaning in
autumn at an ungodly hour to make a delivery.<rant />





-- 
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web:    http://www.hobbelt.com/
        http://www.hebbut.net/
mail:   [email protected]
mobile: +31-6-11 120 978
--------------------------------------------------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.