New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addendum PR4988 - dead-lock in std.allocator.free_list unittest #4993

Merged
merged 1 commit into from Dec 24, 2016

Conversation

Projects
None yet
3 participants
@WalterWaldron
Contributor

WalterWaldron commented Dec 24, 2016

https://issues.dlang.org/show_bug.cgi?id=16352

#4988 Fixed the cause, this allows the test to fail properly.

What was typically happening was

    private void decNodes() shared
    {
        assert(nodes);
        atomicOp!("-=")(nodes, 1);
    }

Would fail the assertion (because of data race.)
I don't know why scope(exit) tid.send(true); didn't allow the main thread to exit.

Anyway, instead I used ThreadGroup.joinAll to rethrow exceptions in the unit test thread.

@dlang-bot

This comment has been minimized.

Show comment
Hide comment
@dlang-bot

dlang-bot Dec 24, 2016

Contributor
Fix Bugzilla Description
16352 dead-lock in std.allocator.free_list unittest
Contributor

dlang-bot commented Dec 24, 2016

Fix Bugzilla Description
16352 dead-lock in std.allocator.free_list unittest
@andralex

thx

@andralex andralex merged commit ee68d84 into dlang:master Dec 24, 2016

5 checks passed

CyberShadow/DAutoTest Documentation OK (no changes)
Details
auto-tester Pass: 10
Details
ci/circleci Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 88.326%)
Details
codecov/project 88.326% (+0.017%) compared to 05e9cba
Details

@WalterWaldron WalterWaldron deleted the WalterWaldron:fix16352 branch Dec 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment