Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

merge stable #3315

Merged
merged 13 commits into from
Dec 21, 2020
Merged

merge stable #3315

merged 13 commits into from
Dec 21, 2020

Conversation

MartinNowak
Copy link
Member

  • Fix Issue 21441 - TypeInfo_Enum.destroy and TypeInfo_Enum.postblit not calling destroy and postblit of base type
  • Fix 21442: Do not call shrink for AA in finalizers
  • Fix documentation of cas
  • Fix Issue 21468 - Inscrutable template error when core.stdcpp.vector of a struct with a core.stdcpp.vector field is referenced before the struct's definition
  • Fix Issue 21421 - core.stdcpp.new_.cpp_delete does not work with classes
  • Allocate _tlsRanges in C heap
  • Fix Issue 21417 - core.stdcpp.new_.cpp_delete unnecessarily requires destruction to be @nogc
  • Fix 21484: Infinite loop in core.memory : GC.{get,set,clr}Attr(const scope void*...)

MartinNowak and others added 13 commits November 25, 2020 12:23
…t calling destroy and postblit of base type

Also offTi but as that does not seem to be implemented yet mentioning it
in the change log would be confusing.
This can easily lead to InvalidMemoryOperation (e.g. in Vibe.d).
…of a struct with a core.stdcpp.vector field is referenced before the struct's definition

Related discussion at https://forum.dlang.org/thread/efjydhujahujqjrvmnsk@forum.dlang.org
Similar to the issue fixed here dlang#1655 (comment) ,
static version of the sections_elf_shared accesses TLS of a dead thread. The simplest fix is to allocate
_tlsRanges somewhere that would persist outside of the thread scope, for example the C heap.

This was encountered while porting ldc 1.24.0 to Alpine Linux which uses Musl.
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/14364 But this issue should
be affecting other libc implementations as well.
core.stdcpp.new_.cpp_delete unnecessarily requires destruction to be @nogc
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
…scope void*...)

Those functions never worked, and would cause an infinite recursion.
In a non-optimized build that would exhaust the stack and trigger a SEGV,
however in the optimized build we distribute, it results in an infinite
loop as tail call optimization is performed.
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @MartinNowak!

Bugzilla references

Auto-close Bugzilla Severity Description
21417 enhancement core.stdcpp.new_.cpp_delete unnecessarily requires destruction to be @nogc
21421 normal core.stdcpp.new_.cpp_delete does not work with classes
21441 normal TypeInfo_Enum.destroy and TypeInfo_Enum.postblit not calling destroy and postblit of base type
21442 critical Calling AA.remove from a destructor might lead to InvalidMemoryOperationError
21468 normal Inscrutable template error when core.stdcpp.vector of a struct with a core.stdcpp.vector field is referenced before the struct's definition
21484 major Infinite recursion in core.memory : GC.{get,set,clr}Attr(const scope void*...)

Testing this PR locally

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

dub run digger -- build "master + druntime#3315"

@dlang-bot dlang-bot added the Enhancement New functionality label Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants