Openwrt Linux Uclibc ARM GC issue

David Nadlinger code at klickverbot.at
Fri Dec 15 14:24:08 UTC 2017


On 15 Dec 2017, at 14:06, Radu via digitalmars-d-ldc wrote:
> When run, I get this error spuriously:
>
> ====================================
> core.exception.AssertError at rt/sections_elf_shared.d(116): Assertion 
> failure
> Fatal error in EH code: _Unwind_RaiseException failed with reason 
> code: 9
> Aborted (core dumped)
> ====================================

The assert is inside an invariant which checks that the TLS information 
has been extracted successfully. Perhaps uclibc uses a TLS 
implementation that is not ABI-compatible with glibc? (druntime needs to 
determine the TLS ranges to register them with the GC, for the main 
thread as well as newly spawned ones.)

Where in the program lifecycle does the error occur? From the backtrace, 
it looks like during C runtime startup, in which case I am not quite 
seeing the connection to the GC.

Why unwinding fails is another question, but not one I would be terribly 
worried about – it is possible that the error e.g. just occurs too 
early for the EH machinery to be properly set up yet. Other low-level 
parts of druntime have been converted to directly abort (e.g. using 
assert(0)) instead. In fact, I am about to overhaul sections_elf_shared 
in that respect anyway to improve error reporting when mixing shared and 
non-shared builds.

  — David


More information about the digitalmars-d-ldc mailing list