Skip to content

Comments

Fix Issue 18760 - theAllocator dangling reference bug#6449

Merged
andralex merged 1 commit intodlang:masterfrom
edi33416:fix_thread_alloc
Apr 17, 2018
Merged

Fix Issue 18760 - theAllocator dangling reference bug#6449
andralex merged 1 commit intodlang:masterfrom
edi33416:fix_thread_alloc

Conversation

@edi33416
Copy link
Contributor

This fixes the following bug

    import std.experimental.allocator.mallocator : Mallocator;

    auto a = sharedAllocatorObject(Mallocator.instance);
    auto buf = theAllocator.allocate(42);
    processAllocator = a;
    theAllocator.deallocate(buf);

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @edi33416! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the annotated coverage diff directly on GitHub with CodeCov's browser extension
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "master + phobos#6449"

@JackStouffer
Copy link
Contributor

This should have a bug report.

@edi33416
Copy link
Contributor Author

This should have a bug report.

I'll file one and then link this to it

@edi33416 edi33416 changed the title Fix theAllocator dangling reference bug Fix Issue 18760 - theAllocator dangling reference bug Apr 13, 2018
@n8sh
Copy link
Member

n8sh commented Apr 13, 2018

The auto-tester failure appears unrelated.

@edi33416
Copy link
Contributor Author

@CyberShadow any idea why DAutoTest is failing?

@CyberShadow
Copy link
Member

It is a random failure likely due a concurrency issue, see here:
dlang/dlang.org#2345

@edi33416
Copy link
Contributor Author

Got it. Apparently it's kicking quite a few PRs lately.

@jercaianu
Copy link
Contributor

@edi33416 can you rebase please?

Copy link
Member

@andralex andralex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch

@andralex
Copy link
Member

@CyberShadow can you please take a look at the failure?

@andralex andralex merged commit 4126f92 into dlang:master Apr 17, 2018
@CyberShadow
Copy link
Member

@CyberShadow can you please take a look at the failure?

It looks like compilation or execution of changed.d failed, but there is nothing in the log to indicate why. Possibly the process died because of a signal, e.g. due to running out of memory.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants