[Issue 20132] New: segfault on fiber.call() in release mode
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 15 17:08:59 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20132
Issue ID: 20132
Summary: segfault on fiber.call() in release mode
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: zorael at gmail.com
dmd 2.078.1, Manjaro/Arch x86_64. dub 1.16.0, ldc 1.16.0.
When calling a specific Fiber in dub's release mode, the program segfaults. It
works in debug mode, and binaries compiled with ldc are not affected in either
mode. It does not happen on Windows, dmd 2.078.0.
> git clone https://github.com/zorael/tests -b fibersegfault
> cd tests
> dub build -b release-debug
> gdb --ex 'run' --ex 'bt' ./fibersegfault
I reduced it as much as I could, and the resulting source is a brittle mess.
Literally changing anything more in it, like removing or reordering function
calls, makes the segfault go away. It's only good for reproducing the segfault
and debugging, not for reasoning about.
> Program received signal SIGSEGV, Segmentation fault.
> 0x00005555555a355b in _D8kameloso7plugins4help13onCommandHelpFCQBnQBhQBc10HelpPluginSQCj3irc4defs8IRCEventZ2dgMFZv (__capture=0x0) at source/kameloso/plugins/help.d:15
> 15 void dg()
> #0 0x00005555555a355b in _D8kameloso7plugins4help13onCommandHelpFCQBnQBhQBc10HelpPluginSQCj3irc4defs8IRCEventZ2dgMFZv (__capture=0x0) at source/kameloso/plugins/help.d:15
> #1 0x00007ffff7d7936c in core.thread.Fiber.run() () from /usr/lib/libphobos2.so.0.87
> #2 0x00007ffff7d78733 in fiber_entryPoint () from /usr/lib/libphobos2.so.0.87
> #3 0x0000000000000000 in ?? ()
> Backtrace stopped: Cannot access memory at address 0x7ffff7fce000
__capture=0x0?
--
More information about the Digitalmars-d-bugs
mailing list