Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std.signals connect() error #10186

Open
dlangBugzillaToGithub opened this issue Jun 25, 2016 · 0 comments
Open

std.signals connect() error #10186

dlangBugzillaToGithub opened this issue Jun 25, 2016 · 0 comments
Labels
Arch:x86_64 Issues specific to x86_64 OS:Linux Issues specific to Linux Severity:Normal

Comments

@dlangBugzillaToGithub
Copy link

nmtigor.wang reported this on 2016-06-25T04:04:18Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=16203

CC List

Description

Hello, 

my test codes are as follows:

==============
module dtest;

import std.signals;

struct SIG {}

class C1
{
  void watch( SIG ) {}
  void delegate(T1) createWatcher( T1 )() 
  {
  	return delegate void( T1 sig ) { watch( sig ); };
  }
}

class C2
{
  mixin Signal!SIG;
}

unittest
{
  auto c1 = new C1;
  auto c2 = new C2;  
  auto slot = c1.createWatcher!SIG;
  c2.connect( slot );
}
==============

When I run "rdmd -main -unittest dtest", it outputs following messages:

/tmp/.rdmd-1000/rdmd-dtest.d-1873AE3B357FD0F111512F17802663A4/dtest(_D4core7runtime18runModuleUnitTestsUZ19unittestSegvHandlerUNbiPS4core3sys5posix6signal9siginfo_tPvZv+0x38)[0x45f67c]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x113d0)[0x7f97e53a03d0]
段错误 (核心已转储)

These messages are too vague. The source code of connect() also looks magic. I have no idea of what's wrong.
@LightBender LightBender removed the P3 label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch:x86_64 Issues specific to x86_64 OS:Linux Issues specific to Linux Severity:Normal
Projects
None yet
Development

No branches or pull requests

2 participants