Bug 16031 – [REG2.071] stale DW.ref.name EH symbol used with -lib and -fPIC

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2016-05-16T17:02:00Z
Last change time
2017-07-19T15:01:38Z
Keywords
EH, pull
Assigned to
code
Creator
mk

Comments

Comment #0 by mk — 2016-05-16T17:02:53Z
make -f posix.mak MODEL=32 DMD=../dmd/src/dmd PIC=1 DMD v2.070-devel-1aa8a1e DEBUG Internal error: backend/elfobj.c 1040 posix.mak:184: recipe for target 'generated/linux/release/32/libdruntime.a' failed make: *** [generated/linux/release/32/libdruntime.a] Error 1 dmd from git, v2.071.1 (master HEAD too) linux x86 I'm not sure if this is a dmd regression, but the compilation worked in v2.0.70
Comment #1 by bugzilla — 2016-05-24T00:11:42Z
(In reply to Martin Krejcirik from comment #0) > make -f posix.mak MODEL=32 DMD=../dmd/src/dmd PIC=1 What does the PIC=1 do? PIC isn't anywhere in posix.mak
Comment #2 by mk — 2016-05-24T09:29:41Z
(In reply to Walter Bright from comment #1) > What does the PIC=1 do? PIC isn't anywhere in posix.mak It's there, it adds -fPIC to DFLAGS.
Comment #3 by code — 2016-09-14T04:39:54Z
Easy enough to guess that this is an issue with PIC and the new DWARF EH code. Seems like it was introduced by https://github.com/dlang/dmd/commit/58910e74854b7f7b86e5cec50a6d73943fc29f87, b/c Sdw_ref_idx gets cached but not reset before generating further objects. https://github.com/dlang/dmd/pull/6129
Comment #4 by github-bugzilla — 2016-09-14T06:20:17Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/253b94371378a1acdaca26b515366be74b4f35bd fix Issue 16031 - symbol idx out of bounds w/ multilib and PIC - the types in the catch handler type tables can reoccur and would use a cached DW.ref.name symbol from an older object file - reset DW.ref.name symbol idx before generating next object file - fixes EH for .a archives with PIC https://github.com/dlang/dmd/commit/b551db57c275a58c93745b5d62ca956caca15010 Merge pull request #6129 from MartinNowak/fix16031 fix Issue 16031 - symbol idx out of bounds w/ multilib and PIC
Comment #5 by github-bugzilla — 2016-09-27T04:01:23Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/253b94371378a1acdaca26b515366be74b4f35bd fix Issue 16031 - symbol idx out of bounds w/ multilib and PIC https://github.com/dlang/dmd/commit/b551db57c275a58c93745b5d62ca956caca15010 Merge pull request #6129 from MartinNowak/fix16031
Comment #6 by github-bugzilla — 2016-11-04T09:05:05Z
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/253b94371378a1acdaca26b515366be74b4f35bd fix Issue 16031 - symbol idx out of bounds w/ multilib and PIC https://github.com/dlang/dmd/commit/b551db57c275a58c93745b5d62ca956caca15010 Merge pull request #6129 from MartinNowak/fix16031
Comment #7 by dlang-bugzilla — 2017-07-19T15:01:38Z
*** Issue 16290 has been marked as a duplicate of this issue. ***