Bug 20132 – segfault on fiber.call() in release mode

Status
NEW
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-08-15T17:08:59Z
Last change time
2024-12-13T19:05:00Z
Assigned to
No Owner
Creator
JR
Moved to GitHub: dmd#19610 →

Comments

Comment #0 by zorael — 2019-08-15T17:08:59Z
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?
Comment #1 by zorael — 2019-08-17T18:55:27Z
That's supposed to be the current 2.087.1, not 2.078.1. My apologies.
Comment #2 by robert.schadek — 2024-12-13T19:05:00Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19610 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB