# Compiling 4.2 on armv7 (and i686)

**URL:** <https://forums.swift.org/t/compiling-4-2-on-armv7-and-i686/16267>\
**Category:** Compiler\
**Tags:** linux, arm, i686, x86\
**Created:** [September 18, 2018, 3:45pm UTC](https://forums.swift.org/t/compiling-4-2-on-armv7-and-i686/16267 "2018-09-18T15:45:19Z")\
**Posts on this page:** 3\
**Page:** 4

<div class="post-metadata">

**Author:** ![Kaiede](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/kaiede/32/4749_2.png) [@Kaiede](https://forums.swift.org/u/Kaiede)\
**Post date:** [October 12, 2018, 1:23am UTC](https://forums.swift.org/t/compiling-4-2-on-armv7-and-i686/16267/61 "2018-10-12T01:23:58Z")

</div>

> [@Douglas\_Gregor](#):
>
> I hit this at one point in the last week or two with x86\_64 Linux, and fixed it in one of my pull requests... but I don't know which specific pull request or commit addressed the problem. The last week or so was fairly rocky with the landing of `swift_getAssociatedTypeWitness()` .

Unfortunately, synced to HEAD as of today, I'm still seeing this issue. I had to fix a couple other regressions introduced on 32-bit since the Oct 3rd to get there, but it's really not liking something going on in this function right now. Both i686 and Arm32 are segfaulting, but I expect Darwin Arm32 is probably fine here.

EDIT: I do have some more details this time. The crash is happening because the pointer at wtable-\>Description (conformance) is non-zero, but not valid. Specifically the state I'm getting back is: `wtable = 0xb76f816c, wtable->Description = 0x200`.

Is the `ProtocolConformanceDescriptor` in the table supposed to participate in relocation/linking, perhaps? This looks suspiciously like the resilient witness table problem.

---

<div class="post-metadata">

**Author:** ![Kaiede](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/kaiede/32/4749_2.png) [@Kaiede](https://forums.swift.org/u/Kaiede)\
**Post date:** [October 16, 2018, 3:01pm UTC](https://forums.swift.org/t/compiling-4-2-on-armv7-and-i686/16267/62 "2018-10-16T15:01:59Z")

</div>

@Douglas_Gregor pinging again, since it looks like another commit was made after I last posted (  
[[ABI] Move the resilient witness table into the conformance descriptor. · apple/swift@41891f6 · GitHub](https://github.com/apple/swift/commit/41891f62665b5c5f5d697610a1c8c4cbb73edd71#diff-4b6702ba49fc06a4ca7e3bd7e199278f)). It may change this behavior a bit, so I’ll test it, but it’d be a bit easier to debug this issue if I had a better idea what was going on in this space. Pointers to code/tests that would help me here would be useful.

I can say that the commit before that one in this area was broken when I tried it though, which was the one that prompted the last post. [https://github.com/apple/swift/commit/aba018c1e83cf8ccef93bd506cfd76e2b109a58b#diff-4b6702ba49fc06a4ca7e3bd7e199278f](https://github.com/apple/swift/commit/aba018c1e83cf8ccef93bd506cfd76e2b109a58b#diff-4b6702ba49fc06a4ca7e3bd7e199278f)

---

<div class="post-metadata">

**Author:** ![Douglas\_Gregor](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/douglas_gregor/32/1362_2.png) [@Douglas\_Gregor](https://forums.swift.org/u/Douglas_Gregor)\
**Post date:** [October 16, 2018, 6:19pm UTC](https://forums.swift.org/t/compiling-4-2-on-armv7-and-i686/16267/63 "2018-10-16T18:19:05Z")

</div>

> [@Kaiede](#):
>
> EDIT: I do have some more details this time. The crash is happening because the pointer at wtable-\>Description (conformance) is non-zero, but not valid. Specifically the state I'm getting back is: `wtable = 0xb76f816c, wtable->Description = 0x200` .
> 
> Is the `ProtocolConformanceDescriptor` in the table supposed to participate in relocation/linking, perhaps? This looks suspiciously like the resilient witness table problem.

It's a pointer to the `ProtocolConformanceDescriptor`, which will be copied from the witness table "pattern" by `swift_getGenericWitnessTable()` or (for witness tables that don't require instantiation) part of the witness table itself. It is encoded as a (non-relative) pointer, so yes... it will participate in relocation and linking.

Doug

[Previous page](https://forums.swift.org/t/compiling-4-2-on-armv7-and-i686/16267.md?page=3)
