D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17291 - [REG 2.074-b1] windows: invalid relocation entries
Summary: [REG 2.074-b1] windows: invalid relocation entries
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Windows
: P1 regression
Assignee: No Owner
URL:
Keywords: pull, wrong-code
Depends on:
Blocks:
 
Reported: 2017-04-02 07:28 UTC by Rainer Schuetze
Modified: 2017-08-07 13:15 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Rainer Schuetze 2017-04-02 07:28:24 UTC
When compiling 

struct Struc(T)
{
	static shared T* p;
}

void foo()
{
	Struc!int.p = null;
}

with current stable or dmd 2.074-b1, using Agner Fog's objconv to disassemble the file reports:

C:\tmp\d>objconv.exe -fasm ptr.obj

Input file: ptr.obj, output file: ptr.asm
Converting from OMF32 to Disassembly32
Checksums are zero
Warning 1203: Unrecognized data in OMF subrecord

This was introduced by https://github.com/dlang/dmd/pull/6534 and very likely is the cause for https://github.com/dlang/druntime/pull/1763 to fail.
Comment 1 Rainer Schuetze 2017-04-02 08:26:53 UTC
https://github.com/dlang/dmd/pull/6667
Comment 2 github-bugzilla 2017-04-02 09:03:39 UTC
Commits pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/4b45720a9ec80d16af713164ccc56e649d3a83f6
fix issue 17291: relocations for pointer references might also need "back patches"

https://github.com/dlang/dmd/commit/cd33499302cb27d0676c92035e3a6310adcb5c54
Merge pull request #6667 from rainers/issue17291

fix issue 17291: bad relocations for pointer references
Comment 3 github-bugzilla 2017-04-09 17:57:03 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/4b45720a9ec80d16af713164ccc56e649d3a83f6
fix issue 17291: relocations for pointer references might also need "back patches"

https://github.com/dlang/dmd/commit/cd33499302cb27d0676c92035e3a6310adcb5c54
Merge pull request #6667 from rainers/issue17291
Comment 4 github-bugzilla 2017-08-07 13:15:36 UTC
Commits pushed to newCTFE at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/4b45720a9ec80d16af713164ccc56e649d3a83f6
fix issue 17291: relocations for pointer references might also need "back patches"

https://github.com/dlang/dmd/commit/cd33499302cb27d0676c92035e3a6310adcb5c54
Merge pull request #6667 from rainers/issue17291