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

Conversation

@joakim-noah
Copy link
Contributor

The recently-merged support for linker-generated section brackets (#1379) causes a segfault on Android, when rt_term tries to free module info that is no longer malloced. I'm guessing it broke for Solaris too, though I haven't tested it. This PR seems to fix it- all druntime and phobos tests on Android/x86 and linux/x86 pass locally- let me know if any further tweaks are necessary.

@joakim-noah
Copy link
Contributor Author

Looks like setting _modules to null in rt.minfo was causing a segfault in the debug build on linux, so I got rid of it. I had only tested locally with a release build, which is why I didn't see the issue, but I can reproduce with a debug build. The cause is the invariant in rt.sections_elf_shared, which is called after the modules are removed, likely when the destructor is run. I don't know why it only triggered on one module from the debug build, std.parallelism, but getting rid of the null assignment should fix the issue.

@joakim-noah
Copy link
Contributor Author

As @MartinNowak asked for in a previously-merged PR thread, moved some non-Posix bionic declarations into their own directory.

@joakim-noah joakim-noah mentioned this pull request Feb 23, 2016
@dnadlinger
Copy link
Contributor

@redstar: IIRC you are testing Solaris?

@MartinNowak
Copy link
Member

Auto-merge toggled on

MartinNowak added a commit that referenced this pull request Feb 24, 2016
Properly free module info when using linker-generated section brackets
@MartinNowak MartinNowak merged commit 4fb9f6c into dlang:master Feb 24, 2016
@redstar
Copy link
Contributor

redstar commented Feb 24, 2016

@klickverbot I'll check this on Solaris.

@joakim-noah joakim-noah deleted the freemod branch February 24, 2016 08:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants