Bug 20873 – std.parallelism.task mistakenly trusts user-supplied implicit-conversion routines

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2020-05-28T12:26:49Z
Last change time
2024-12-01T16:36:52Z
Keywords
safe
Assigned to
No Owner
Creator
Mathias LANG
Moved to GitHub: phobos#10420 →

Comments

Comment #0 by pro.mathias.lang — 2020-05-28T12:26:49Z
``` import std.parallelism; void myTask (int a) @safe {} struct Deceptive { public int deception () @system { int* ptr = cast(int*) 42; return *ptr; } alias deception this; } void main () @safe { Deceptive d; auto t = task(&myTask, d); taskPool.put(t); t.spinForce(); } ``` Compiles and crash with DIP1000.
Comment #1 by robert.schadek — 2024-12-01T16:36:52Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10420 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB