Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive

fix issue 17788: MSCOFF: TLS broken with VS2017 15.3.1#1910

Merged
PetarKirov merged 2 commits intodlang:stablefrom
rainers:issue17788
Sep 5, 2017
Merged

fix issue 17788: MSCOFF: TLS broken with VS2017 15.3.1#1910
PetarKirov merged 2 commits intodlang:stablefrom
rainers:issue17788

Conversation

@rainers
Copy link
Member

@rainers rainers commented Aug 27, 2017

with VS2017 15.3.1 segment .tls is no longer written to a separate image section, so _tls_start and _tls_end no longer happen to work as both __gshared and TLS section offsets.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @rainers!

Bugzilla references

Auto-close Bugzilla Description
17788 MSCOFF: TLS broken when linking with linker from VS2017 15.3.1

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

@dlang-bot dlang-bot added the Bug Fix Include reference to corresponding bugzilla issue label Aug 27, 2017
@dnadlinger
Copy link
Contributor

@rainers: Does this affect LDC as well? It seems like we are using the same code.

@PetarKirov
Copy link
Member

@rainers how confident are you with this solution, should we try to include it the next beta of 2.076.0?

void* pend;
version(Win32)
{
asm @nogc nothrow
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be guarded by D_InlineAsm too?

@rainers
Copy link
Member Author

rainers commented Aug 28, 2017

@rainers: Does this affect LDC as well? It seems like we are using the same code.

Yes, see ldc-developers/ldc#2279 (comment)

@rainers how confident are you with this solution, should we try to include it the next beta of 2.076.0?

Should work for all VC at least back to VS2005, they all use _tls_used for the TLS directory. I'll retarget stable if it passes. There are also other issues with this VS update that break Visual D, though.

Shouldn't this be guarded by D_InlineAsm too?

Yeah, probably better. I replaced Win32 with D_InlineAsm_X86, etc.

@PetarKirov PetarKirov added this to the 2.076.0 milestone Aug 28, 2017
@PetarKirov
Copy link
Member

PetarKirov commented Aug 28, 2017

Should work for all VC at least back to VS2005, they all use _tls_used for the TLS directory. I'll retarget stable if it passes. There are also other issues with this VS update that break Visual D, though.

Great to hear, I've added this to the 2.076.0 milestone. CC @MartinNowak

… written to a separate image section, so _tls_start and _tls_end no longer happen to work as both __gshared and TLS section offsets.
@rainers rainers changed the base branch from master to stable August 28, 2017 17:51
@rainers
Copy link
Member Author

rainers commented Aug 28, 2017

rebased to stable.

@kinke
Copy link
Contributor

kinke commented Sep 4, 2017

We'll 'need' this for LDC 1.4 final.

@dnadlinger
Copy link
Contributor

DAutoTest failure is unrelated.

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

Labels

Bug Fix Include reference to corresponding bugzilla issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants