CFThread after join logs implicit error that is not fixable

Description

The Lucee debugging log reports Implicit Variable Access when I do cfthread["threadname"] after a join.

There is no such thing as thread.cfthread, so what are you expecting us to type so that UndefinedImpl.java is not triggered?

It seems like this is an inconsistency or bug with the implicit checker since I don't think I can "fix" this in CFML code alone.

It looks simple to fix by preventing this line from running UndefinedImpl.java below pc.getThreadScope:
if (debug) debugCascadedAccess(pc, "thread", key);

It is probably better performance to do it there then have a true top level scope everywhere.

I made a commit with my suggested solution.

Environment

None

Activity

Show:
Bruce Kirkpatrick
November 21, 2018, 9:45 PM

Sorry, I managed to do the change wrong several times. But I think you'll understand what I'm doing.
https://github.com/brucekirkpatrick/Lucee/commit/25d62a2efd0db2831ca3453b45d04e4bef36a776

Pothys - MitrahSoft
November 29, 2018, 1:43 PM

I've checked this ticket with your commit & After joining the threads, debugging logs doesn't show the cfthread under implicit variables. will confirm about this.

Michael Offner
August 12, 2019, 5:45 PM

we cannot do it that way, that would no longer log implicit thread access

Example:

 

Michael Offner
August 12, 2019, 6:04 PM

Fixed

Assignee

Michael Offner

Reporter

Bruce Kirkpatrick

Priority

Critical

Labels

Fix versions

Sprint

None

Affects versions

Configure