#829 closed defect (fixed)

task variable dtor called with wrong argument

Reported by: strauman Owned by: Joel Sherrill
Priority: highest Milestone: 2
Component: score Version: 4.6
Severity: critical Keywords:
Cc: bugs@… Blocked By:


If task variables are deleted from a different context (i.e., executing context != 'owner' of the task variable. 'owner' meaning the task that registered the dtor in question) the argument passed to the task variable dtor must be 'tvar' and not *ptr which yields the executing task's value of the task variable instead of the 'owner's.


create thread a; let a register a task var with a destructor and let the destructor printk() the task var's value. Then 'a' suspends itself.

When a is eventually deleted by task b the destructor prints b's value of the task var instead of a's.

Attachments (1)

taskvar_dtor.diff (2.2 KB) - added by strauman on Dec 3, 2006 at 1:31:13 PM.

Download all attachments as: .zip

Change History (2)

comment:1 Changed on Oct 4, 2005 at 8:56:23 PM by Joel Sherrill

Status: assignedclosed

State-Changed-From-To: open->closed
State-Changed-Why: Patch applied to 4.6 branch and CvS trunk.

Changed on Dec 3, 2006 at 1:31:13 PM by strauman

Attachment: taskvar_dtor.diff added


Note: See TracTickets for help on using tickets.