static int bar[];
void main () {
import std.concurrency : spawn;
spawn ( & foo );
}
void foo () {
bar ~= 0;
}
This program segfaults if compiled with -profile=gc. Seems to happen at rt_term of runAll at dmain2.d.
Comment #5 by jj75607 — 2016-04-18T07:43:38Z
Profiler fails with atomic operations:
import core.atomic;
shared struct S
{
uint counter;
bool inc() shared
{
atomicOp!("+=")(counter, 1);
return true;
}
}
int main(string[] argv)
{
S s;
return 0;
}
This program segfaults if compiled with profiler hooks
Comment #6 by sascha.orlov — 2016-11-08T12:32:11Z
After an update from 2.071.2 to 2.072.0
a seg fault with the profile option on a mac appear with the following example
void main() {}
void f()
{
import core.atomic: atomicOp;
shared size_t workUnitIndex;
atomicOp!"+="(workUnitIndex, 1);
}
which does not appear with the prior version of atomic.d
Many thanks to ag0aep6g for helping with the code.
Comment #7 by github-bugzilla — 2017-07-19T17:41:29Z