metaeducation / rebol-issues

6 stars 1 forks source link

Crash while recycling #145

Closed rebolbot closed 5 years ago

rebolbot commented 17 years ago

Submitted by: Gregg

REBOL []

bc.. test-block: [a b c d e f]

p.

bc.. ; set 'f1 func [ ; /local buff ; ][ ; buff: copy "" ; append buff f2 ; ;buff ; ]

p.

bc.. set 'f2 func [ /local buff ][ buff: copy "" foreach val test-block [ loop 5000 [ append buff reform [reduce [ 'OK ] crlf] ] ] buff ]

p.

bc.. f2

p.

CC - Data [ Version: 1.0.0 Type: Bug Platform: All Category: n/a Reproduce: Always Fixed-in:none ]

rebolbot commented 17 years ago

Submitted by: admin

Need code posted above. If it's too big, we'll probably need to hold off for now (because we have many small scripts that still crash ;)

Posted two smaller scripts that narrow the problem down. The above code is in %users/gregg/buff-recycle-test-2.r. It should crash the first time you run it. %users/gregg/buff-recycle-test-3.r is the same thing, just without the commented f1 func in the source; that one crashes the second time you run it.

At one point adding or removing a local word in f2 would make it happen or not. It doesn't seem to matter what is in test-block, or how big it is, but it does matter that the outer loop uses FOREACH. If you change it to LOOP, the problem goes away. No more time to play with various values and such right now. HTH.

Oldes commented 5 years ago

I tried all 3 buff recycle tests from the old Altme r3-alpha world, where Gregg stored them, and none of them crashes in (my) current build.